adapt to third-party hardware

pull/61/head
johbenny 2023-09-14 08:25:50 +08:00
parent 3eb604ebb8
commit cdd59433c4
2 changed files with 3 additions and 3 deletions

View File

@ -329,8 +329,8 @@ APIEvent::Type Device::attemptToBeginCommunication() {
return getCommunicationNotEstablishedError();
std::string currentSerial = getNeoDevice().serial;
if(currentSerial != serial->deviceSerial)
return APIEvent::Type::IncorrectSerialNumber;
// if(currentSerial != serial->deviceSerial)
// return APIEvent::Type::IncorrectSerialNumber;
auto maybeVersions = com->getVersionsSync();
if(!maybeVersions)

View File

@ -169,7 +169,7 @@ bool IDeviceSettings::refresh(bool ignoreChecksum) {
return false;
}
if(rxLen < gsLen) {
if(rxLen <= gsLen) {
// We got less data, i.e. the firmware thinks the strucure is smaller than what
// was last saved. Usually this is due to a firmware downgrade. We'll ignore the
// checksum for now, because it will definitely be wrong.