mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-29 06:06:38 +00:00
Move the rotation input to target.cpp
This commit is contained in:
@@ -1,14 +1,4 @@
|
|||||||
#include "HeltecRC32Board.h"
|
#include "HeltecRC32Board.h"
|
||||||
#if defined(UI_HAS_ROTARY_INPUT)
|
|
||||||
#include "HeltecRC32RotaryInput.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(UI_HAS_ROTARY_INPUT)
|
|
||||||
RotaryInput& HeltecRC32Board::rotaryInput() {
|
|
||||||
static HeltecRC32RotaryInput input(&periph_power);
|
|
||||||
return input;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void HeltecRC32Board::begin() {
|
void HeltecRC32Board::begin() {
|
||||||
ESP32Board::begin();
|
ESP32Board::begin();
|
||||||
|
|||||||
@@ -4,9 +4,6 @@
|
|||||||
#include <driver/rtc_io.h>
|
#include <driver/rtc_io.h>
|
||||||
#include <helpers/ESP32Board.h>
|
#include <helpers/ESP32Board.h>
|
||||||
#include <helpers/RefCountedDigitalPin.h>
|
#include <helpers/RefCountedDigitalPin.h>
|
||||||
#if defined(UI_HAS_ROTARY_INPUT)
|
|
||||||
#include <helpers/ui/RotaryInput.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ADC_MULTIPLIER
|
#ifndef ADC_MULTIPLIER
|
||||||
#define ADC_MULTIPLIER 4.9f
|
#define ADC_MULTIPLIER 4.9f
|
||||||
@@ -22,9 +19,6 @@ public:
|
|||||||
HeltecRC32Board() : periph_power(SENSOR_POWER_CTRL_PIN, SENSOR_POWER_ON){}
|
HeltecRC32Board() : periph_power(SENSOR_POWER_CTRL_PIN, SENSOR_POWER_ON){}
|
||||||
|
|
||||||
void begin();
|
void begin();
|
||||||
#if defined(UI_HAS_ROTARY_INPUT)
|
|
||||||
RotaryInput& rotaryInput();
|
|
||||||
#endif
|
|
||||||
void onBeforeTransmit() override;
|
void onBeforeTransmit() override;
|
||||||
void onAfterTransmit() override;
|
void onAfterTransmit() override;
|
||||||
void powerOff() override;
|
void powerOff() override;
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
#if defined(UI_HAS_ROTARY_INPUT)
|
||||||
|
#include "HeltecRC32RotaryInput.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
HeltecRC32Board board;
|
HeltecRC32Board board;
|
||||||
|
|
||||||
@@ -27,7 +30,8 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
|||||||
DISPLAY_CLASS display;
|
DISPLAY_CLASS display;
|
||||||
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
#if defined(UI_HAS_ROTARY_INPUT)
|
#if defined(UI_HAS_ROTARY_INPUT)
|
||||||
RotaryInput& rotary_input = board.rotaryInput();
|
static HeltecRC32RotaryInput rotaryInputImpl(&board.periph_power);
|
||||||
|
RotaryInput& rotary_input = rotaryInputImpl;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user