2023-11-28 15:11:30 -05:00
|
|
|
/*
|
|
|
|
This is the protocol list handler. It holds an instance of all known protocols.
|
|
|
|
So include here the .hpp, and add a new element to the protos vector in the constructor. That's all you need to do here if you wanna add a new proto.
|
|
|
|
@htotoo
|
|
|
|
*/
|
Subghz decoder (#1646)
* Initial commit - wip
* Half part of the transition of baseband processor.
* More SGD
* WIP, Weather refactor, UI improv
* Rename
* Added 4msps, and fixes
* Fixes
* princeton working
* Renamed proc_weather, bc now multifunctional
* Proto: bett
* FPS_CAME = 4,
FPS_PRASTEL = 5,
FPS_AIRFORCE = 6,
* Came Atomo, fixes
* Separate weather and sgd, bc of baseband size limit
* Fix display
* Save space
* More protos
* Dooya proto added
* More protos
* add protos
* More protos
* Move weather to ext app
* nw
* Revert "Move weather to ext app"
This reverts commit 8a84aac2f59274b72de7c7803deb137a21838076.
* revert
* Fix merge
* Better naming
* More protos
* More protos
* Add protos
* Fix warning
* Add NeroRadio
* more protos
* more protos
* More protos
* Shrink a bit
* fixes
* More protos
* Nicer code
* Fix naming
* Fix format
* Remove unused
* Fix some protos, that needs a LOOOONG part with the same lo/high
* Modify key calculation
2023-12-16 17:37:51 -05:00
|
|
|
|
|
|
|
#include "fprotolistgeneral.hpp"
|
|
|
|
|
2023-11-28 15:11:30 -05:00
|
|
|
#include "w-nexus-th.hpp"
|
|
|
|
#include "w-acurite592txr.hpp"
|
|
|
|
#include "w-acurite606tx.hpp"
|
|
|
|
#include "w-acurite609tx.hpp"
|
|
|
|
#include "w-ambient.hpp"
|
|
|
|
#include "w-auriol-ahfl.hpp"
|
|
|
|
#include "w-auriol-th.hpp"
|
|
|
|
#include "w-gt-wt-02.hpp"
|
|
|
|
#include "w-gt-wt-03.hpp"
|
|
|
|
#include "w-infactory.hpp"
|
|
|
|
#include "w-lacrosse-tx.hpp"
|
|
|
|
#include "w-lacrosse-tx141thbv2.hpp"
|
|
|
|
#include "w-oregon2.hpp"
|
|
|
|
#include "w-oregon3.hpp"
|
|
|
|
#include "w-oregonv1.hpp"
|
|
|
|
#include "w-thermoprotx4.hpp"
|
|
|
|
#include "w-tx8300.hpp"
|
|
|
|
#include "w-wendox-w6726.hpp"
|
2023-11-30 06:36:59 -05:00
|
|
|
#include "w-acurite986.hpp"
|
2024-07-24 05:53:09 -04:00
|
|
|
#include "w-kedsum.hpp"
|
|
|
|
#include "w-acurite5in1.hpp"
|
|
|
|
#include "w-emose601x.hpp"
|
2024-09-06 14:23:11 -04:00
|
|
|
#include "w-solight_te44.hpp"
|
2024-07-24 05:53:09 -04:00
|
|
|
|
2023-11-28 15:11:30 -05:00
|
|
|
#include <vector>
|
|
|
|
#include <memory>
|
|
|
|
#include "portapack_shared_memory.hpp"
|
|
|
|
|
Subghz decoder (#1646)
* Initial commit - wip
* Half part of the transition of baseband processor.
* More SGD
* WIP, Weather refactor, UI improv
* Rename
* Added 4msps, and fixes
* Fixes
* princeton working
* Renamed proc_weather, bc now multifunctional
* Proto: bett
* FPS_CAME = 4,
FPS_PRASTEL = 5,
FPS_AIRFORCE = 6,
* Came Atomo, fixes
* Separate weather and sgd, bc of baseband size limit
* Fix display
* Save space
* More protos
* Dooya proto added
* More protos
* add protos
* More protos
* Move weather to ext app
* nw
* Revert "Move weather to ext app"
This reverts commit 8a84aac2f59274b72de7c7803deb137a21838076.
* revert
* Fix merge
* Better naming
* More protos
* More protos
* Add protos
* Fix warning
* Add NeroRadio
* more protos
* more protos
* More protos
* Shrink a bit
* fixes
* More protos
* Nicer code
* Fix naming
* Fix format
* Remove unused
* Fix some protos, that needs a LOOOONG part with the same lo/high
* Modify key calculation
2023-12-16 17:37:51 -05:00
|
|
|
#ifndef __FPROTO_PROTOLISTWTH_H__
|
|
|
|
#define __FPROTO_PROTOLISTWTH_H__
|
2023-11-28 15:11:30 -05:00
|
|
|
|
Subghz decoder (#1646)
* Initial commit - wip
* Half part of the transition of baseband processor.
* More SGD
* WIP, Weather refactor, UI improv
* Rename
* Added 4msps, and fixes
* Fixes
* princeton working
* Renamed proc_weather, bc now multifunctional
* Proto: bett
* FPS_CAME = 4,
FPS_PRASTEL = 5,
FPS_AIRFORCE = 6,
* Came Atomo, fixes
* Separate weather and sgd, bc of baseband size limit
* Fix display
* Save space
* More protos
* Dooya proto added
* More protos
* add protos
* More protos
* Move weather to ext app
* nw
* Revert "Move weather to ext app"
This reverts commit 8a84aac2f59274b72de7c7803deb137a21838076.
* revert
* Fix merge
* Better naming
* More protos
* More protos
* Add protos
* Fix warning
* Add NeroRadio
* more protos
* more protos
* More protos
* Shrink a bit
* fixes
* More protos
* Nicer code
* Fix naming
* Fix format
* Remove unused
* Fix some protos, that needs a LOOOONG part with the same lo/high
* Modify key calculation
2023-12-16 17:37:51 -05:00
|
|
|
class WeatherProtos : public FProtoListGeneral {
|
2023-11-28 15:11:30 -05:00
|
|
|
public:
|
2024-07-29 04:46:45 -04:00
|
|
|
WeatherProtos(const WeatherProtos&) { WeatherProtos(); }; // won't use, but makes compiler happy
|
|
|
|
WeatherProtos& operator=(const WeatherProtos&) { return *this; } // won't use, but makes compiler happy
|
2023-11-28 15:11:30 -05:00
|
|
|
WeatherProtos() {
|
|
|
|
// add protos
|
2024-07-29 04:46:45 -04:00
|
|
|
protos[FPW_NexusTH] = new FProtoWeatherNexusTH();
|
|
|
|
protos[FPW_Acurite592TXR] = new FProtoWeatherAcurite592TXR();
|
|
|
|
protos[FPW_Acurite606TX] = new FProtoWeatherAcurite606TX();
|
|
|
|
protos[FPW_Acurite609TX] = new FProtoWeatherAcurite609TX();
|
|
|
|
protos[FPW_Ambient] = new FProtoWeatherAmbient();
|
|
|
|
protos[FPW_AuriolAhfl] = new FProtoWeatherAuriolAhfl();
|
|
|
|
protos[FPW_AuriolTH] = new FProtoWeatherAuriolTh();
|
|
|
|
protos[FPW_GTWT02] = new FProtoWeatherGTWT02();
|
|
|
|
protos[FPW_GTWT03] = new FProtoWeatherGTWT03();
|
|
|
|
protos[FPW_INFACTORY] = new FProtoWeatherInfactory();
|
|
|
|
protos[FPW_LACROSSETX] = new FProtoWeatherLaCrosseTx();
|
|
|
|
protos[FPW_LACROSSETX141thbv2] = new FProtoWeatherLaCrosseTx141thbv2();
|
|
|
|
protos[FPW_OREGON2] = new FProtoWeatherOregon2();
|
|
|
|
protos[FPW_OREGON3] = new FProtoWeatherOregon3();
|
|
|
|
protos[FPW_OREGONv1] = new FProtoWeatherOregonV1();
|
|
|
|
protos[FPW_THERMOPROTX4] = new FProtoWeatherThermoProTx4();
|
|
|
|
protos[FPW_TX_8300] = new FProtoWeatherTX8300();
|
|
|
|
protos[FPW_WENDOX_W6726] = new FProtoWeatherWendoxW6726();
|
|
|
|
protos[FPW_Acurite986] = new FProtoWeatherAcurite986();
|
|
|
|
protos[FPW_KEDSUM] = new FProtoWeatherKedsum();
|
|
|
|
protos[FPW_Acurite5in1] = new FProtoWeatherAcurite5in1();
|
|
|
|
protos[FPW_EmosE601x] = new FProtoWeatherEmosE601x();
|
2024-09-06 14:23:11 -04:00
|
|
|
protos[FPW_SolightTE44] = new FProtoWeatherSolightTE44();
|
2023-11-28 15:11:30 -05:00
|
|
|
|
|
|
|
// set callback for them
|
2024-07-29 04:46:45 -04:00
|
|
|
for (uint8_t i = 0; i < FPW_COUNT; ++i) {
|
|
|
|
protos[i]->setCallback(callbackTarget);
|
2023-11-28 15:11:30 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-29 04:46:45 -04:00
|
|
|
~WeatherProtos() { // not needed for current operation logic, but a bit more elegant :)
|
|
|
|
for (uint8_t i = 0; i < FPW_COUNT; ++i) {
|
|
|
|
if (protos[i] != NULL) {
|
|
|
|
free(protos[i]);
|
|
|
|
protos[i] = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2023-11-28 15:11:30 -05:00
|
|
|
static void callbackTarget(FProtoWeatherBase* instance) {
|
2024-09-06 14:23:11 -04:00
|
|
|
WeatherDataMessage packet_message{instance->getSensorType(), instance->getData()};
|
2023-11-28 15:11:30 -05:00
|
|
|
shared_memory.application_queue.push(packet_message);
|
|
|
|
}
|
|
|
|
|
|
|
|
void feed(bool level, uint32_t duration) {
|
2024-07-29 04:46:45 -04:00
|
|
|
for (uint8_t i = 0; i < FPW_COUNT; ++i) {
|
|
|
|
if (protos[i] != NULL) protos[i]->feed(level, duration);
|
2023-11-28 15:11:30 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
2024-07-29 04:46:45 -04:00
|
|
|
FProtoWeatherBase* protos[FPW_COUNT] = {NULL};
|
2023-11-28 15:11:30 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|