klew pisze: ↑czw kwie 30, 2020 9:40 pm
Następnie wywal z "iterate" wszystko poza Supla iterate
Kod: Zaznacz cały
D:\Pushover\test\test.ino: In function 'void setup()':
test:61:14: error: expected ';' before 'notif'
new MyNotif *notif = new MyNotif;
^
test:62:25: error: 'notif' was not declared in this scope
buttonSet->willTrigger(*notif, Supla::Control::Button::ON_PRESS, SEND_PO_1);
Na tym etapie doszedłem do wniosku, że trzeba odwiedzić GitHuba
A dalej wypluło to:
Kod: Zaznacz cały
D:\Pushover\test\test.ino: In function 'void setup()':
test:51:41: error: 'ON_PRESS' is not a member of 'Supla::Control::Button'
buttonSet->willTrigger(*sensor, Supla::Control::Button::ON_PRESS, Supla::Sensor::VirtualBinary::SET); // Aktywowanie sensora poczty
^
test:51:75: error: 'SET' is not a member of 'Supla::Sensor::VirtualBinary'
buttonSet->willTrigger(*sensor, Supla::Control::Button::ON_PRESS, Supla::Sensor::VirtualBinary::SET); // Aktywowanie sensora poczty
^
test:53:43: error: 'ON_PRESS' is not a member of 'Supla::Control::Button'
buttonClear->willTrigger(*sensor, Supla::Control::Button::ON_PRESS, Supla::Sensor::VirtualBinary::CLEAR); // Dezaktywowanie sensora poczty
^
test:53:77: error: 'CLEAR' is not a member of 'Supla::Sensor::VirtualBinary'
buttonClear->willTrigger(*sensor, Supla::Control::Button::ON_PRESS, Supla::Sensor::VirtualBinary::CLEAR); // Dezaktywowanie sensora poczty
^
test:60:14: error: expected ';' before 'notif'
new MyNotif *notif = new MyNotif;
^
test:61:25: error: 'notif' was not declared in this scope
buttonSet->willTrigger(*notif, Supla::Control::Button::ON_PRESS, SEND_PO_1);
^
test:61:32: error: 'ON_PRESS' is not a member of 'Supla::Control::Button'
buttonSet->willTrigger(*notif, Supla::Control::Button::ON_PRESS, SEND_PO_1);
^
test:62:34: error: 'ON_PRESS' is not a member of 'Supla::Control::Button'
buttonClear->willTrigger(*notif, Supla::Control::Button::ON_PRESS, SEND_PO_2);
^
Idąc dalej, w Twojej nowej bibliotece (w
button.h) dodałem:
Kod: Zaznacz cały
enum Event {
ON_PRESS, // Triggered on transition to valueOnPress()
ON_RELEASE, // Triggered on transition from valueOnPress()
ON_CHANGE // Triggered on all transitions
};
Ostatnio zmieniony czw kwie 30, 2020 10:20 pm przez
Xoggo, łącznie zmieniany 1 raz.