Miguel Angel Caycho
/
Pruebas_Ventilador_Eplimin_01_Backup
para el ventilador
Diff: nextion_interface.cpp
- Revision:
- 9:95fdcdc0977e
- Parent:
- 8:208d965a3bd2
- Child:
- 10:b2d87404309a
--- a/nextion_interface.cpp Thu Apr 23 17:05:36 2020 +0000 +++ b/nextion_interface.cpp Sun Apr 26 08:50:12 2020 +0000 @@ -67,14 +67,7 @@ nextion_display.printf("%c%c%c", 0xff, 0xff, 0xff); nextion_display.printf("t7.pco=%d", NORMAL_COLOR); nextion_display.printf("%c%c%c", 0xff, 0xff, 0xff); - /* - pc.printf("t6.pco=%d\n\r", NORMAL_COLOR); - pc.printf("%c%c%c\n\r", 0xff, 0xff, 0xff); - pc.printf("t7.pco=%d\n\r", NORMAL_COLOR); - pc.printf("%c%c%c\n\r", 0xff, 0xff, 0xff); - pc.printf("t8.pco=%d\n\r", NORMAL_COLOR); - pc.printf("%c%c%c\n\r", 0xff, 0xff, 0xff); - */ + /* Print default values */ Volume_Setpoint_Fix(); Resp_Frequency_Fix(); @@ -217,7 +210,12 @@ } void Volume_Display_Update(void){ - nextion_display.printf("t11.txt=\"%.2f\"", volume_ml); + nextion_display.printf("t11.txt=\"%d\"", (int16_t)volume_ml); + nextion_display.printf("%c%c%c", 0xff, 0xff, 0xff); +} + +void Flow_Display_Update(void){ + nextion_display.printf("t14.txt=\"%.3f\"", flow_lpm); nextion_display.printf("%c%c%c", 0xff, 0xff, 0xff); } @@ -226,11 +224,6 @@ nextion_display.printf("%c%c%c", 0xff, 0xff, 0xff); } -void Flow_Display_Update(void){ - nextion_display.printf("t14.txt=\"%.2f\"", flow_lpm); - nextion_display.printf("%c%c%c", 0xff, 0xff, 0xff); -} - void Nextion_Plot_Volume_Waveform(void){ @@ -239,7 +232,7 @@ uint16_t volume_scaled_value; //volume_scaled_value = (uint16_t)((volume_ml - 0.5)*VOLUME_WAVEFORM_HEIGHT*2) ; - volume_scaled_value = (uint16_t)((volume_ml - 0.5)*2) ; + volume_scaled_value = (uint16_t)((volume_ml - 0.5)*4) ; x_pos_counter++; @@ -290,8 +283,6 @@ } - - nextion_display.printf("line %d,%d,%d,%d,%d",(x_pos - 1), prev_y_pos, x_pos, y_pos, YELLOW); nextion_display.printf("%c%c%c", 0xff, 0xff, 0xff); @@ -305,7 +296,7 @@ uint16_t x_pos, y_pos; uint16_t pressure_02_scaled_value; - pressure_02_scaled_value = (uint16_t)((pressure_02_psi - 0.5)*PRESSURE_WAVEFORM_HEIGHT*2) ; + pressure_02_scaled_value = (uint16_t)(pressure_02_psi * PRESSURE_WAVEFORM_HEIGHT * 2) ; x_pos_counter++;