Расширить общие API графиков и GAS обмена
This commit is contained in:
@@ -34,8 +34,11 @@ int main(void)
|
||||
assert(!set_trend_watch_ack(expected, 4, 1000, 3));
|
||||
const uint8_t packet[] = {1, 2, 3, 4, 2, 0, 52, 18, 255, 255};
|
||||
uint16_t words[64];
|
||||
uint32_t timestamp = 0;
|
||||
assert(set_trend_watch_values(packet, sizeof(packet), words, 64) == 2);
|
||||
assert(words[0] == 0x1234 && words[1] == 0xFFFF);
|
||||
assert(set_trend_watch_decode(packet, sizeof(packet), ×tamp, words, 64) == 2);
|
||||
assert(timestamp == 0x04030201UL);
|
||||
assert(set_trend_watch_values(packet, sizeof(packet) - 1, words, 64) == -1);
|
||||
assert(set_trend_watch_values(packet, sizeof(packet), words, 1) == -1);
|
||||
puts("Shared trend tests passed");
|
||||
|
||||
Reference in New Issue
Block a user