Skip to content

Commit

Permalink
Merge pull request #1 from toms74209200/change_display_data
Browse files Browse the repository at this point in the history
✨ add offset of display data
  • Loading branch information
toms74209200 authored Dec 1, 2021
2 parents 133a038 + e37855d commit e69d952
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/co2_chart/co2_chart.ino
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ constexpr uint16_t CHART_DATA_OFFSET = 14;
constexpr uint16_t CHART_DATA_HIGHT = SCREEN_HEIGHT - 14;
constexpr uint16_t CHART_DATA_MIN = 350;
constexpr uint16_t CHART_DATA_MAX = 3000;
constexpr auto OFFSET_DISPLAY_DATA = 5;

led::Red led_r = led::Red();
led::Green led_g = led::Green();
Expand Down Expand Up @@ -91,7 +92,7 @@ void loop() {
sprintf(display_data, "%d ppm", filtered_data);

display.clearDisplay();
display.setCursor(0, 0);
display.setCursor(OFFSET_DISPLAY_DATA, OFFSET_DISPLAY_DATA);
display.println(display_data);

co2_data_vector.erase(co2_data_vector.begin());
Expand Down

0 comments on commit e69d952

Please sign in to comment.