diff --git a/soti-nucleo-project/App/Src/app.c b/soti-nucleo-project/App/Src/app.c index 90b92fc..c22139f 100644 --- a/soti-nucleo-project/App/Src/app.c +++ b/soti-nucleo-project/App/Src/app.c @@ -132,6 +132,7 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) CANMessage msg = { .cmd = CMD_CDH_PROCESS_TELEMETRY_REPORT }; + osMessageQueuePut(s_output_queue, &msg, 0U, 0U); } } diff --git a/soti/screens/main_screen.py b/soti/screens/main_screen.py index 8568d00..e217f16 100644 --- a/soti/screens/main_screen.py +++ b/soti/screens/main_screen.py @@ -117,7 +117,12 @@ def _on_command_entered(self, text: str): def _on_message_received(self, msg: Message): """Called when a new message arrives.""" - transaction = f"{str(msg.sender.name)} → {str(msg.recipient.name)} : {str(msg.cmd.name)}" + # Distinguish ack messages. + if(msg.is_ack): + transaction = f"{str(msg.recipient.name)} ← {str(msg.sender.name)} : {str(msg.cmd.name)}" + else: + transaction = f"{str(msg.sender.name)} → {str(msg.recipient.name)} : {str(msg.cmd.name)}" + body_contents = parse_msg_body(msg.cmd, msg.body) arguments = "" for key, value in body_contents.items():