Skip to content

Commit

Permalink
[net tutorial]: remove inconsequntial diff content
Browse files Browse the repository at this point in the history
  • Loading branch information
ppannuto committed Dec 9, 2024
1 parent 8205794 commit c93d71d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions examples/tutorials/thread_network/09_screen_final/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ int main(void) {
u8g2_SetFont(&u8g2, u8g2_font_profont12_tr);
u8g2_SetFontPosTop(&u8g2);

// Enable buttons
for (int i = 0; i < 4; i++) {
libtock_button_notify_on_press(i, button_callback);
}
Expand All @@ -69,9 +70,13 @@ static void update_screen(void) {
"Global Set Point: %d",
global_temperature_setpoint);

uint8_t whole_temp = measured_temperature / 100;
uint8_t decimal_temp = measured_temperature % 100;

sprintf(temperature_current_measure_str,
"Measured Temp: %d",
measured_temperature);
"Measured Temp: %d.%d",
whole_temp,
decimal_temp);

// Use u8g2 library to draw each string.
u8g2_ClearBuffer(&u8g2);
Expand Down
2 changes: 1 addition & 1 deletion examples/tutorials/thread_network/10_screen_ipc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static void update_screen(void);

uint8_t global_temperature_setpoint = 0;
uint8_t local_temperature_setpoint = 22;
int measured_temperature = 0;
uint8_t measured_temperature = 0;

uint8_t prior_global_temperature_setpoint = 255;
uint8_t prior_local_temperature_setpoint = 255;
Expand Down

0 comments on commit c93d71d

Please sign in to comment.