mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
chore: delete code that never compiles from Somfy.cpp
USE_NVS is never defined, so the NVS-era shade storage (loadLegacy, SomfyShade::load and the NVS branches) never built. Also drop the commented-out toJSON methods, snprintf emitters and unused CC1101 options, useNVS() and sort_asc(), which nothing calls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
4544eb6469
commit
bbfb23e972
2 changed files with 0 additions and 761 deletions
60
src/Somfy.h
60
src/Somfy.h
|
|
@ -227,9 +227,6 @@ class SomfyShade : public SomfyRemote {
|
|||
bool flipPosition = false;
|
||||
shade_types shadeType = shade_types::roller;
|
||||
tilt_types tiltType = tilt_types::none;
|
||||
#ifdef USE_NVS
|
||||
void load();
|
||||
#endif
|
||||
float currentPos = 0.0f;
|
||||
float currentTiltPos = 0.0f;
|
||||
int8_t lastMovement = 0;
|
||||
|
|
@ -334,7 +331,6 @@ class SomfyGroup : public SomfyRemote {
|
|||
bool save();
|
||||
void clear();
|
||||
bool fromJSON(JsonObject &obj);
|
||||
//bool toJSON(JsonObject &obj);
|
||||
bool linkShade(uint8_t shadeId);
|
||||
bool unlinkShade(uint8_t shadeId);
|
||||
bool hasShadeId(uint8_t shadeId);
|
||||
|
|
@ -373,58 +369,7 @@ struct transceiver_config_t {
|
|||
float rxBandwidth = 99.97; // Receive bandwidth in kHz. Value from 58.03 to 812.50. Default is 99.97kHz.
|
||||
int8_t txPower = 10; // Transmission power {-30, -20, -15, -10, -6, 0, 5, 7, 10, 11, 12}. Default is 12.
|
||||
bool noiseDetection = false; // Disable RX interrupt when RF noise is detected (>100 pulses/10s)
|
||||
/*
|
||||
bool internalCCMode = false; // Use internal transmission mode FIFO buffers.
|
||||
byte modulationMode = 2; // Modulation mode. 0 = 2-FSK, 1 = GFSK, 2 = ASK/OOK, 3 = 4-FSK, 4 = MSK.
|
||||
uint8_t channel = 0; // The channel number from 0 to 255
|
||||
float channelSpacing = 199.95; // Channel spacing in multiplied by the channel number and added to the base frequency in kHz. 25.39 to 405.45. Default 199.95
|
||||
float dataRate = 99.97; // The data rate in kBaud. 0.02 to 1621.83 Default is 99.97.
|
||||
uint8_t syncMode = 0; // 0=No preamble/sync,
|
||||
// 1=16 sync word bits detected,
|
||||
// 2=16/16 sync words bits detected.
|
||||
// 3=30/32 sync word bits detected,
|
||||
// 4=No preamble/sync carrier above threshold
|
||||
// 5=15/16 + carrier above threshold.
|
||||
// 6=16/16 + carrier-sense above threshold
|
||||
// 7=0/32 + carrier-sense above threshold
|
||||
uint16_t syncWordHigh = 211; // The sync word used to the sync mode.
|
||||
uint16_t syncWordLow = 145; // The sync word used to the sync mode.
|
||||
uint8_t addrCheckMode = 0; // 0=No address filtration
|
||||
// 1=Check address without broadcast.
|
||||
// 2=Address check with 0 as broadcast.
|
||||
// 3=Address check with 0 or 255 as broadcast.
|
||||
uint8_t checkAddr = 0; // Packet filter address depending on addrCheck settings.
|
||||
bool dataWhitening = false; // Indicates whether data whitening should be applied.
|
||||
uint8_t pktFormat = 0; // 0=Use FIFO buffers form RX and TX
|
||||
// 1=Synchronous serial mode. RX on GDO0 and TX on either GDOx pins.
|
||||
// 2=Random TX mode. Send data using PN9 generator.
|
||||
// 3=Asynchronous serial mode. RX on GDO0 and TX on either GDOx pins.
|
||||
uint8_t pktLengthMode = 0; // 0=Fixed packet length
|
||||
// 1=Variable packet length
|
||||
// 2=Infinite packet length
|
||||
// 3=Reserved
|
||||
uint8_t pktLength = 0; // Packet length
|
||||
bool useCRC = false; // Indicates whether CRC is to be used.
|
||||
bool autoFlushCRC = false; // Automatically flush RX FIFO when CRC fails. If more than one packet is in the buffer it too will be flushed.
|
||||
bool disableDCFilter = false; // Digital blocking filter for demodulator. Only for data rates <= 250k.
|
||||
bool enableManchester = true; // Enable/disable Manchester encoding.
|
||||
bool enableFEC = false; // Enable/disable forward error correction.
|
||||
uint8_t minPreambleBytes = 0; // The minimum number of preamble bytes to be transmitten.
|
||||
// 0=2bytes
|
||||
// 1=3bytes
|
||||
// 2=4bytes
|
||||
// 3=6bytes
|
||||
// 4=8bytes
|
||||
// 5=12bytes
|
||||
// 6=16bytes
|
||||
// 7=24bytes
|
||||
uint8_t pqtThreshold = 0; // Preamble quality estimator threshold. The preable quality estimator increase an internal counter by one each time a bit is received that is different than the prevoius bit and
|
||||
// decreases the bounter by 8 each time a bit is received that is the same as the lats bit. A threshold of 4 PQT for this counter is used to gate sync word detection.
|
||||
// When PQT = 0 a sync word is always accepted.
|
||||
bool appendStatus = false; // Appends the RSSI and LQI values to the TX packed as well as the CRC.
|
||||
*/
|
||||
void fromJSON(JsonObject& obj);
|
||||
//void toJSON(JsonObject& obj);
|
||||
void save();
|
||||
void load();
|
||||
void apply();
|
||||
|
|
@ -446,7 +391,6 @@ class Transceiver {
|
|||
public:
|
||||
transceiver_config_t config;
|
||||
bool printBuffer = false;
|
||||
//bool toJSON(JsonObject& obj);
|
||||
bool fromJSON(JsonObject& obj);
|
||||
// Swaps in, saves and applies the config.
|
||||
void setConfig(const transceiver_config_t &cfg);
|
||||
|
|
@ -480,7 +424,6 @@ class SomfyShadeController {
|
|||
uint8_t m_shadeIds[SOMFY_MAX_SHADES];
|
||||
uint32_t lastCommit = 0;
|
||||
public:
|
||||
bool useNVS();
|
||||
bool isDirty = false;
|
||||
uint32_t startingAddress;
|
||||
uint8_t getNextRoomId();
|
||||
|
|
@ -533,9 +476,6 @@ class SomfyShadeController {
|
|||
void writeBackup();
|
||||
String backupData;
|
||||
bool loadShadesFile(const char *filename);
|
||||
#ifdef USE_NVS
|
||||
bool loadLegacy();
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue