Commit 1a9771f2 authored by Your Name's avatar Your Name

change interface

parent bedf4827
...@@ -90,11 +90,10 @@ void protocalAck(int fileusb) ...@@ -90,11 +90,10 @@ void protocalAck(int fileusb)
} }
// get angle and change into 16bits, return; // get angle and change into 16bits, return;
uint16_t getAngle(char *rece) short getAngle(char *rece)
{ {
uint16_t angle; short angle;
int result = 0; short result = 0;
int i = 0; int i = 0;
char *p = rece; char *p = rece;
while (*(p + i) != 'a' || *(p + i + 1) != 'n') while (*(p + i) != 'a' || *(p + i + 1) != 'n')
...@@ -109,7 +108,7 @@ uint16_t getAngle(char *rece) ...@@ -109,7 +108,7 @@ uint16_t getAngle(char *rece)
i++; i++;
continue; continue;
} }
int num = *(p + i) - '0'; short num = *(p + i) - '0';
result = result * 10 + num; result = result * 10 + num;
i++; i++;
} }
...@@ -346,7 +345,7 @@ void circleReading() //changed ...@@ -346,7 +345,7 @@ void circleReading() //changed
else else
{ {
sentUart(buf, fileuart, fileusb); printf(" %d\n", __LINE__); sentUart(buf, fileuart, fileusb); printf(" %d\n", __LINE__);
serialFlush(fileusb); //guarantee buf wont affect next input //serialFlush(fileusb); //guarantee buf wont affect next input
} }
} }
} }
...@@ -545,7 +544,16 @@ void eachPicWrite(int num, int pic) ...@@ -545,7 +544,16 @@ void eachPicWrite(int num, int pic)
int ops = op[i]; int ops = op[i];
for (int j = 0; j < 18; j++) for (int j = 0; j < 18; j++)
{ {
AW20144_Byte_Write(chips, AW20144_PAGE1, num+offset, LocalDimmingLedData[pic][i*18 + j]); /*
if (LocalDimmingLedData[pic][i*18 + j] == 0x00){
AW20144_Byte_Write(chips, AW20144_PAGE1, num+offset, 0x00);
}
else{
AW20144_Byte_Write(chips, AW20144_PAGE1, num+offset, LocalDimmingLedData[pic][i*18 + j] + 0x30);
}
*/
AW20144_Byte_Write(chips, AW20144_PAGE1, num+offset, 0xff); //LocalDimmingLedData[pic][i*18 + j]
//AW20144_Byte_Write(chips, AW20144_PAGE1, num+offset, *(a + temp)); //AW20144_Byte_Write(chips, AW20144_PAGE1, num+offset, *(a + temp));
//printf("%d\n", num+offset); //printf("%d\n", num+offset);
//printf("%x\n", *(a + temp)); //printf("%x\n", *(a + temp));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment