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

change interface

parent bedf4827
......@@ -90,11 +90,10 @@ void protocalAck(int fileusb)
}
// get angle and change into 16bits, return;
uint16_t getAngle(char *rece)
short getAngle(char *rece)
{
uint16_t angle;
int result = 0;
short angle;
short result = 0;
int i = 0;
char *p = rece;
while (*(p + i) != 'a' || *(p + i + 1) != 'n')
......@@ -109,7 +108,7 @@ uint16_t getAngle(char *rece)
i++;
continue;
}
int num = *(p + i) - '0';
short num = *(p + i) - '0';
result = result * 10 + num;
i++;
}
......@@ -346,7 +345,7 @@ void circleReading() //changed
else
{
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)
int ops = op[i];
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));
//printf("%d\n", num+offset);
//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