* preliminary state, compiles good not tested on hardware

* converted struct inverter_t to class Inverter
* started with calculation functions (idea from Hubi/mikrocontroller.net)
This commit is contained in:
lumapu 2022-04-27 23:03:37 +02:00
parent d195eee498
commit f6b75aff90
15 changed files with 214 additions and 290 deletions

View file

@ -20,9 +20,9 @@ class mqtt {
delete mClient;
}
void setup(const char *broker, const char *topic, const char *user, const char *pwd) {
void setup(const char *broker, const char *topic, const char *user, const char *pwd, uint16_t port) {
mAddressSet = true;
mClient->setServer(broker, 1883);
mClient->setServer(broker, port);
snprintf(mUser, MQTT_USER_LEN, "%s", user);
snprintf(mPwd, MQTT_PWD_LEN, "%s", pwd);