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"
|
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:
|
|
|
|
WeatherProtos() {
|
|
|
|
// add protos
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherNexusTH>()); // 1
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherAcurite592TXR>()); // 2
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherAcurite606TX>()); // 3
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherAcurite609TX>()); // 4
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherAmbient>()); // 5
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherAuriolAhfl>()); // 6
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherAuriolTh>()); // 7
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherGTWT02>()); // 8
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherGTWT03>()); // 9
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherInfactory>()); // 10
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherLaCrosseTx>()); // 11
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherLaCrosseTx141thbv2>()); // 12
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherOregon2>()); // 13
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherOregon3>()); // 14
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherOregonV1>()); // 15
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherThermoProTx4>()); // 16
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherTX8300>()); // 17
|
|
|
|
protos.push_back(std::make_unique<FProtoWeatherWendoxW6726>()); // 18
|
2023-11-30 06:36:59 -05:00
|
|
|
protos.push_back(std::make_unique<FProtoWeatherAcurite986>()); // 19
|
2023-11-28 15:11:30 -05:00
|
|
|
|
|
|
|
// set callback for them
|
|
|
|
for (const auto& obj : protos) {
|
|
|
|
obj->setCallback(callbackTarget);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void callbackTarget(FProtoWeatherBase* instance) {
|
|
|
|
WeatherDataMessage packet_message{instance->getSensorType(), instance->getSensorId(),
|
|
|
|
instance->getTemp(), instance->getHumidity(), instance->getBattLow(),
|
|
|
|
instance->getChannel(), instance->getButton()};
|
|
|
|
shared_memory.application_queue.push(packet_message);
|
|
|
|
}
|
|
|
|
|
|
|
|
void feed(bool level, uint32_t duration) {
|
|
|
|
for (const auto& obj : protos) {
|
|
|
|
obj->feed(level, duration);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
std::vector<std::unique_ptr<FProtoWeatherBase>> protos{};
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|