瀏覽代碼

small fixes

main
David 2 年之前
父節點
當前提交
86b6d7d329
共有 4 個檔案被更改,包括 7 行新增6 行删除
  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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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


Loading…
取消
儲存