Расширить общие API графиков и GAS обмена

This commit is contained in:
2026-09-05 02:37:11 +03:00
parent 78d3f6690b
commit b1f7b965f4
22 changed files with 294 additions and 39 deletions

View File

@@ -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), &timestamp, 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");