Explorar el Código

small fixes

main
David hace 2 años
padre
commit
86b6d7d329
Se han modificado 4 ficheros con 7 adiciones y 6 borrados
  1. +1
    -1
      MK3_Firmware/include/TimeSystem.h
  2. +4
    -3
      MK3_Firmware/src/App.cpp
  3. +1
    -1
      MK3_Firmware/src/Scenes/SceneMainMenu.cpp
  4. +1
    -1
      MK3_Firmware/src/Tasks/TaskThermometer.cpp

+ 1
- 1
MK3_Firmware/include/TimeSystem.h Ver fichero

@@ -2,7 +2,7 @@
#define TIME_SYSTEM_H

#include <Arduino.h>
#include <Time.h>
#include <TimeLib.h>

/*
** Simple helper functions to change and get time


+ 4
- 3
MK3_Firmware/src/App.cpp Ver fichero

@@ -206,10 +206,11 @@ void Application::Lighting()

void Application::Heating()
{
float temperature = GetCurrentTemperature();
float temperature;
xQueuePeek(temperatureQueue, &temperature, 0);

static uint64_t first_try = 0;
if (temperature == -1) // if there is a problem with the temperature
static unsigned long first_try = 0;
if (temperature <= -1) // if there is a problem with the temperature
{
// stores the timing of the first reading problem
if (first_try == 0)


+ 1
- 1
MK3_Firmware/src/Scenes/SceneMainMenu.cpp Ver fichero

@@ -108,7 +108,7 @@ void SceneMainMenu::DrawTemperature(uint16_t x, uint16_t y, float temperature)
app->Graphics.DrawImage(Sprites::thermometer_32x32, x, y, 32, 32);

app->Graphics.Screen.setCursor(x + 26, y + 6);
if (temperature - DataSaveLoad::ReadThermometerAdjustement() != -1)
if (temperature != -1)
app->Graphics.Screen.printf("%.1f°C", temperature);
else
app->Graphics.Screen.printf(". . . . °C");

+ 1
- 1
MK3_Firmware/src/Tasks/TaskThermometer.cpp Ver fichero

@@ -53,7 +53,7 @@ void ThermometerTask(void *parameter)
if (tempC == -1)
DS18B20Temp.StartDevice();

if (tempC < -1)
if (tempC < -1 || tempC == 85) //85°C is VCC disconnected
tempC = -1; // sometime gets -127 for some reason

// Send temperature to Queue


Cargando…
Cancelar
Guardar