Always update last status
This commit is contained in:
parent
82aefc2a10
commit
805525840b
1 changed files with 5 additions and 2 deletions
|
@ -75,10 +75,13 @@ static void send_status(uint16_t status) {
|
|||
static void loop() {
|
||||
// Check for status changes
|
||||
uint16_t new_status = get_status();
|
||||
if (report_change && new_status != saved_status) {
|
||||
if (new_status != saved_status) {
|
||||
if (report_change) {
|
||||
send_status(new_status);
|
||||
}
|
||||
saved_status = new_status;
|
||||
}
|
||||
|
||||
// Check for new messages
|
||||
if (can_check_message()) {
|
||||
can_t msg = { 0 };
|
||||
|
|
Loading…
Reference in a new issue