Przeglądaj źródła

Fixed wrong I2C address displaying on deletion

Victor 3 lat temu
rodzic
commit
01a7fcbba3
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      views/Widgets_view.c

+ 1 - 1
views/Widgets_view.c

@@ -132,7 +132,7 @@ void unitemp_widget_delete_switch(Sensor* sensor) {
             app->buff,
             app->buff,
             BUFF_SIZE,
             BUFF_SIZE,
             "\e#I2C addr:\e# 0x%02X",
             "\e#I2C addr:\e# 0x%02X",
-            ((I2CSensor*)current_sensor->instance)->currentI2CAdr);
+            ((I2CSensor*)current_sensor->instance)->currentI2CAdr >> 1);
         widget_add_text_box_element(
         widget_add_text_box_element(
             app->widget, 0, 28, 128, 23, AlignLeft, AlignTop, app->buff, false);
             app->widget, 0, 28, 128, 23, AlignLeft, AlignTop, app->buff, false);
     }
     }