VividCAN: Better "Online Not Supported" Error

This commit is contained in:
Paul Hollinsky
2020-09-08 17:39:47 -04:00
parent 3f8ed840ba
commit de0c16a461
3 changed files with 14 additions and 1 deletions
+1
View File
@@ -71,6 +71,7 @@ public:
CANFDNotSupported = 0x2020,
RTRNotSupported = 0x2021,
DeviceDisconnected = 0x2022,
OnlineNotSupported = 0x2023,
// Transport Events
FailedToRead = 0x3000,
+10 -1
View File
@@ -23,7 +23,16 @@ public:
return found;
}
bool goOnline() override { return false; }
// VividCAN does not go online, you can only set settings
bool goOnline() override {
report(APIEvent::Type::OnlineNotSupported, APIEvent::Severity::Error);
return false;
}
bool goOffline() override {
report(APIEvent::Type::OnlineNotSupported, APIEvent::Severity::Error);
return false;
}
private:
VividCAN(neodevice_t neodevice) : Device(neodevice) {