diff --git a/README.md b/README.md index ede01fd..7f42b80 100644 --- a/README.md +++ b/README.md @@ -62,9 +62,9 @@ Recommended: 512kB-1MB+ Flash, 24-32kB+ SRAM, 32-48MHz+ * Definitely ___will___ work: GIGA, Portenta (any), ESP32/8266, Teensy 3.5+, STM32 (>256kB), Pico/RP2040 (any) -* _Can_ work /w ext. data/limited UI/small setup: Uno R4, Nano 33 (any), MKR (any), Due/Zero, Teensy 3.2, STM32 (256kB) +* _Can_ work /w external data/minimal UI: Uno R4, Nano 33 (any), MKR (any), Due/Zero, STM32 (256kB) -* _May_ work, but only with heavy tweaking/limited build: ATMega2560, Genuino 101 +* _May_ work, but only with heavy tweaking/limited build: ATMega2560, Genuino 101, Teensy 3.2 (/3.1), STM32F0 * Definitely ___will not___ work: Uno (classic to R3), Nano (classic & Every), Leonardo/Duemilanove, Micro, Pro, Esplora, Teensy 2/LC, STM8 (|32<256kB), ATtiny (any) diff --git a/src/HelioDefines.h b/src/HelioDefines.h index df66930..c41cb45 100644 --- a/src/HelioDefines.h +++ b/src/HelioDefines.h @@ -55,6 +55,9 @@ #define min(a,b) ((a)<(b)?(a):(b)) #define max(a,b) ((a)>(b)?(a):(b)) #endif +#if defined(CORE_TEENSY) // Missing abs +#define abs(x) ((x)>0?(x):-(x)) +#endif #ifndef RANDOM_MAX // Missing RANDOM_MAX #if defined(RAND_MAX) #define RANDOM_MAX RAND_MAX @@ -671,23 +674,22 @@ class HelioRail; #define SETUP_ENUM_IL3820_V2 112 #define SETUP_ENUM_ST7789 113 #define SETUP_ENUM_ILI9341 114 -#define SETUP_ENUM_TFT 115 -#define SETUP_ENUM_RotaryEncoderOk 116 -#define SETUP_ENUM_RotaryEncoderOkLR 117 -#define SETUP_ENUM_UpDownButtonsOk 118 -#define SETUP_ENUM_UpDownButtonsOkLR 119 -#define SETUP_ENUM_UpDownESP32TouchOk 120 -#define SETUP_ENUM_UpDownESP32TouchOkLR 121 -#define SETUP_ENUM_AnalogJoystickOk 122 -#define SETUP_ENUM_Matrix2x2UpDownButtonsOkL 123 -#define SETUP_ENUM_Matrix3x4Keyboard_OptRotEncOk 124 -#define SETUP_ENUM_Matrix3x4Keyboard_OptRotEncOkLR 125 -#define SETUP_ENUM_Matrix4x4Keyboard_OptRotEncOk 126 -#define SETUP_ENUM_Matrix4x4Keyboard_OptRotEncOkLR 127 -#define SETUP_ENUM_ResistiveTouch 128 -#define SETUP_ENUM_TouchScreen 139 -#define SETUP_ENUM_TFTTouch 130 -#define SETUP_ENUM_RemoteControl 131 +#define SETUP_ENUM_RotaryEncoderOk 115 +#define SETUP_ENUM_RotaryEncoderOkLR 116 +#define SETUP_ENUM_UpDownButtonsOk 117 +#define SETUP_ENUM_UpDownButtonsOkLR 118 +#define SETUP_ENUM_UpDownESP32TouchOk 119 +#define SETUP_ENUM_UpDownESP32TouchOkLR 120 +#define SETUP_ENUM_AnalogJoystickOk 121 +#define SETUP_ENUM_Matrix2x2UpDownButtonsOkL 122 +#define SETUP_ENUM_Matrix3x4Keyboard_OptRotEncOk 123 +#define SETUP_ENUM_Matrix3x4Keyboard_OptRotEncOkLR 124 +#define SETUP_ENUM_Matrix4x4Keyboard_OptRotEncOk 125 +#define SETUP_ENUM_Matrix4x4Keyboard_OptRotEncOkLR 126 +#define SETUP_ENUM_ResistiveTouch 127 +#define SETUP_ENUM_TouchScreen 128 +#define SETUP_ENUM_TFTTouch 129 +#define SETUP_ENUM_RemoteControl 130 // Checks setup defines for equality, first param SETUP_XXX is substituted (possibly to 0), second param literal should be defined (for non-zero substitution) #define IS_SETUP_AS(X,Y) JOIN(SETUP_ENUM,X) == SETUP_ENUM_##Y // Checks setup defines for inequality, first param SETUP_XXX is substituted (possibly to 0), second param literal should be defined (for non-zero substitution) diff --git a/src/HelioMeasurements.h b/src/HelioMeasurements.h index a97856d..65d6ecb 100644 --- a/src/HelioMeasurements.h +++ b/src/HelioMeasurements.h @@ -41,7 +41,7 @@ struct HelioMeasurement { time_t timestamp; // Time event recorded (UTC) hframe_t frame; // Polling frame # measurement taken on, or 0 if not-set else 1 if user-set - inline HelioMeasurement() : type(Unknown), frame(0), timestamp(unixNow()) { ; } + inline HelioMeasurement() : type(Unknown), timestamp(unixNow()), frame(0) { ; } inline HelioMeasurement(int classType, time_t timestampIn, hframe_t frameIn) : type((typeof(type))classType), timestamp(timestampIn), frame(frameIn) { ; } HelioMeasurement(int classType, time_t timestamp = 0); HelioMeasurement(const HelioMeasurementData *dataIn); diff --git a/src/shared/HelioDisplayDrivers.hpp b/src/shared/HelioDisplayDrivers.hpp index 6aee98a..ae2715e 100644 --- a/src/shared/HelioDisplayDrivers.hpp +++ b/src/shared/HelioDisplayDrivers.hpp @@ -3,7 +3,7 @@ Helioduino Display Drivers */ -#include "HelioduinoUI.h" +#include #ifdef HELIO_USE_GUI static inline const u8g2_cb_t *dispRotToU8g2Rot(Helio_DisplayRotation displayRotation) diff --git a/src/shared/HelioUIDefines.h b/src/shared/HelioUIDefines.h index bc0fefd..4413223 100644 --- a/src/shared/HelioUIDefines.h +++ b/src/shared/HelioUIDefines.h @@ -12,7 +12,7 @@ #define HELIO_UI_UPDATE_SPEED 10 #elif F_SPD >= 32000000 #define HELIO_UI_UPDATE_SPEED 5 -#elif F_SPD >= 16000000 +#else #define HELIO_UI_UPDATE_SPEED 2 #endif diff --git a/src/shared/screens/HelioOverviewGFX.cpp b/src/shared/screens/HelioOverviewGFX.cpp index 5d6375f..07167f3 100644 --- a/src/shared/screens/HelioOverviewGFX.cpp +++ b/src/shared/screens/HelioOverviewGFX.cpp @@ -34,7 +34,7 @@ void randomStarColor(uint8_t* r, uint8_t* g, uint8_t* b) { *r = 255; *g = 204; *b = 111; break; } - int randVals[3] = {random(20),random(25),random(20)}; + int randVals[3] = {(int)random(20),(int)random(25),(int)random(20)}; *r = constrain((int)(*r) + (-10 + randVals[0]), 0, 255); *g = constrain((int)(*g) + (-15 + randVals[1]), 0, 255); *b = constrain((int)(*b) + (-10 + randVals[2]), 0, 255);