New: Spectrum analyzer app; custom notification sounds (SD WAV per event); saved Wi-Fi networks with auto-join; unified chat settings screen; per-channel mute; Heltec V4.3 high-gain receiver (FEM LNA) toggle; Apps button on the V4 home screen; Blocked list reachable from Contacts + chat settings; Portuguese (BR) UI language. Fixed: touch-screen flood adverts now region-scoped so region repeaters relay them (#68); channel sends matched by name so a message can't go out on the wrong channel's key; opt-in "scope direct messages to region" so room-server logins work through a region-only path (#64); Wi-Fi scan no longer cancelled by the reconnect retry (empty SSID list). Under the hood: flood-scope rework (channel vs direct floods); Spectrum owns the SX1262 while open and restores mesh RX on exit; wifiScanIsActive() gate; FEM KCT8103L LNA wired; TouchPrefsStore migrations for the new prefs. Adds the previously-untracked device_caps.h. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <Arduino.h>
|
|
#include <helpers/RefCountedDigitalPin.h>
|
|
#include <helpers/ESP32Board.h>
|
|
#include <driver/rtc_io.h>
|
|
#include "LoRaFEMControl.h"
|
|
|
|
#ifndef ADC_MULTIPLIER
|
|
#define ADC_MULTIPLIER 5.42
|
|
#endif
|
|
|
|
class HeltecV4Board : public ESP32Board {
|
|
|
|
protected:
|
|
float adc_mult = ADC_MULTIPLIER;
|
|
|
|
public:
|
|
RefCountedDigitalPin periph_power;
|
|
LoRaFEMControl loRaFEMControl;
|
|
HeltecV4Board() : periph_power(PIN_VEXT_EN,PIN_VEXT_EN_ACTIVE) { }
|
|
|
|
void begin();
|
|
void onBeforeTransmit(void) override;
|
|
void onAfterTransmit(void) override;
|
|
void enterDeepSleep(uint32_t secs, int pin_wake_btn = -1);
|
|
void powerOff() override;
|
|
uint16_t getBattMilliVolts() override;
|
|
bool setAdcMultiplier(float multiplier) override {
|
|
if (multiplier == 0.0f) {
|
|
adc_mult = ADC_MULTIPLIER;
|
|
} else {
|
|
adc_mult = multiplier;
|
|
}
|
|
return true;
|
|
}
|
|
float getAdcMultiplier() const override { return adc_mult; }
|
|
const char* getManufacturerName() const override;
|
|
|
|
// V4.3 (KCT8103L FEM) high-gain receiver LNA (~17 dB). It is BYPASSED by default; this turns it
|
|
// on/off and re-drives the FEM into RX so the change applies to the live receive immediately.
|
|
// femLnaControllable() is true only on boards where the LNA is switchable (V4.3); a no-op elsewhere.
|
|
void setFemLnaEnable(bool en) { loRaFEMControl.setLNAEnable(en); loRaFEMControl.setRxModeEnable(); }
|
|
bool femLnaControllable() { return loRaFEMControl.isLnaCanControl(); }
|
|
};
|