Skip to content

Commit

Permalink
Issue_225: Support Nano Every with Atmega4808
Browse files Browse the repository at this point in the history
  • Loading branch information
boerge1 committed Aug 23, 2024
1 parent 2bfcf6e commit 310ef0b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ Die SD Karte (Ordner mp3 und advert) hat sich gegenüber der Version 3.1.11 geä

# Change Log

## Version 3.2.0 (23.08.2024)
- [Issue 225](https://github.com/tonuino/TonUINO-TNG/issues/225): Support Nano Every with Atmega4808

## Version 3.1.12 (22.08.2024)
- [Issue 222](https://github.com/tonuino/TonUINO-TNG/issues/222): Fix bug: TB modification card ends active game modification card
- [Issue 220](https://github.com/tonuino/TonUINO-TNG/issues/220): New shortcut for switching BT on/off
Expand Down
5 changes: 4 additions & 1 deletion TonUINO-TNG.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ void setup()
LOG(init_log, s_error, F("TonUINO Version 3.1 - refactored by Boerge1\n"));
LOG(init_log, s_error, F("created by Thorsten Voß and licensed under GNU/GPL."));
LOG(init_log, s_error, F("Information and contribution at https://tonuino.de.\n"));
LOG(init_log, s_error, F("V3.1.12 22.08.24\n"));
LOG(init_log, s_error, F("V3.2.0 23.08.24\n"));

#ifdef TonUINO_Classic
LOG(init_log, s_error, F("C "), lf_no);
#endif
#ifdef TonUINO_Every
LOG(init_log, s_error, F("E "), lf_no);
#endif
#ifdef TonUINO_Every_4808
LOG(init_log, s_error, F("EC "), lf_no);
#endif
#ifdef ALLinONE
LOG(init_log, s_error, F("A "), lf_no);
#endif
Expand Down
3 changes: 3 additions & 0 deletions src/buttons3x3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class Buttons3x3: public CommandSource {
#ifdef TonUINO_Every
static constexpr int16_t maxLevel = 900; // 1023
#endif
#ifdef TonUINO_Every_4808
static constexpr int16_t maxLevel = 900; // 1023
#endif
#ifdef ALLinONE
static constexpr int16_t maxLevel = 4300; // 4064;
#endif
Expand Down
8 changes: 6 additions & 2 deletions src/constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
*/
//#define TonUINO_Classic
//#define TonUINO_Every
//#define TonUINO_Every_4808
//#define ALLinONE
//#define ALLinONE_Plus

Expand Down Expand Up @@ -304,6 +305,9 @@ inline constexpr float voltageMeasurementCorrection = 1.960; // Spannungsteil
#ifdef TonUINO_Every
inline constexpr float voltageMeasurementCorrection = 2.007; // Spannungsteiler 100k/100k
#endif
#ifdef TonUINO_Every_4808
inline constexpr float voltageMeasurementCorrection = 2.007; // Spannungsteiler 100k/100k
#endif

inline constexpr float batVoltageLow = 2.95;
inline constexpr float batVoltageEmpty = 2.90;
Expand Down Expand Up @@ -339,7 +343,7 @@ inline constexpr uint32_t buttonLongPressRepeat = 200; // timeout for long pre
** Classic ****************************************************************
***************************************************************************/

#if defined(TonUINO_Classic) or defined(TonUINO_Every)
#if defined(TonUINO_Classic) or defined(TonUINO_Every) or defined(TonUINO_Every_4808)
// ####### buttons #####################################

inline constexpr uint8_t buttonPausePin = A0;
Expand Down Expand Up @@ -400,7 +404,7 @@ inline constexpr levelType shutdownPinType = levelType::activeLow;
#endif
inline constexpr uint8_t openAnalogPin = A7;
inline constexpr unsigned long cycleTime = 50;
#endif /* TonUINO_Classic or TonUINO_Every */
#endif /* TonUINO_Classic or TonUINO_Every or TonUINO_Every_4808 */

/***************************************************************************
** AiO plus ***************************************************************
Expand Down
2 changes: 1 addition & 1 deletion src/rotary_encoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "commands.hpp"
#include "timer.hpp"

#if not defined(ALLinONE_Plus) and not defined(TonUINO_Every)
#if not defined(ALLinONE_Plus) and not defined(TonUINO_Every) and not defined(TonUINO_Every_4808)
#define USE_TIMER1
#define ROTARY_ENCODER_USES_TIMER1
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/tonuino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void Tonuino::setup() {
#endif

#if defined(BUTTONS3X3) or defined(BAT_VOLTAGE_MEASUREMENT)
#if defined(ALLinONE_Plus) or defined(TonUINO_Every)
#if defined(ALLinONE_Plus) or defined(TonUINO_Every) or defined(TonUINO_Every_4808)
analogReference(INTERNAL2V5);
#endif
#ifdef ALLinONE
Expand Down

0 comments on commit 310ef0b

Please sign in to comment.