File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ NetworkConnectionState GenericConnectionHandler::update_handleDisconnected() {
92
92
return _ch != nullptr ? _ch->update_handleDisconnected () : NetworkConnectionState::INIT;
93
93
}
94
94
95
+ #if not defined(BOARD_HAS_LORA)
95
96
unsigned long GenericConnectionHandler::getTime () { // FIXME _ch may be nullptr
96
97
return _ch->getTime ();
97
98
}
@@ -103,3 +104,4 @@ Client & GenericConnectionHandler::getClient() { // FIXME _ch may be nullptr
103
104
UDP & GenericConnectionHandler::getUDP () { // FIXME _ch may be nullptr
104
105
return _ch->getUDP ();
105
106
}
107
+ #endif
Original file line number Diff line number Diff line change @@ -38,9 +38,15 @@ class GenericConnectionHandler : public ConnectionHandler
38
38
39
39
GenericConnectionHandler (): _ch(nullptr ) {}
40
40
41
- unsigned long getTime () override ;
42
- Client & getClient () override ;
43
- UDP & getUDP () override ;
41
+ #if defined(BOARD_HAS_NOTECARD) || defined(BOARD_HAS_LORA)
42
+ virtual bool available () = 0;
43
+ virtual int read () = 0;
44
+ virtual int write (const uint8_t *buf, size_t size) = 0;
45
+ #else
46
+ unsigned long getTime () override ;
47
+ Client & getClient () override ;
48
+ UDP & getUDP () override ;
49
+ #endif
44
50
45
51
bool updateSetting (const models::NetworkSetting& s) override ;
46
52
You can’t perform that action at this time.
0 commit comments