|
|
@ -219,14 +219,14 @@ namespace Heck { |
|
|
|
|
|
|
|
SWTimer heartbeat{}; |
|
|
|
heartbeat.set_period(500); |
|
|
|
heartbeat.set_callback([&heartbeat_led_state](){ |
|
|
|
heartbeat.set_callback([&heartbeat_led_state](u32 time_now) { |
|
|
|
heartbeat_led_state = !heartbeat_led_state; |
|
|
|
hw.SetLed(heartbeat_led_state); |
|
|
|
}); |
|
|
|
|
|
|
|
SWTimer async_log_tx{}; |
|
|
|
async_log_tx.set_period(5); |
|
|
|
async_log_tx.set_callback([time_boot_ms](){ |
|
|
|
async_log_tx.set_callback([](u32 time_now) { |
|
|
|
if (!event_log.IsEmpty()) { |
|
|
|
auto msg = event_log.PopFront(); |
|
|
|
switch (msg.type) { |
|
|
@ -252,7 +252,7 @@ namespace Heck { |
|
|
|
outstr, |
|
|
|
"time-last:\t%ld\ttype: %s\tChannel: %d\tData MSB: " |
|
|
|
"%d\tData LSB: %d\n", |
|
|
|
time_boot_ms, |
|
|
|
time_now, |
|
|
|
type_str, |
|
|
|
msg.channel, |
|
|
|
msg.data[0], |
|
|
|