mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-07-02 10:38:16 +00:00
fix: treat null com port as already deactivated
This commit is contained in:
parent
1681d4e796
commit
148dead020
1 changed files with 1 additions and 1 deletions
|
|
@ -149,7 +149,7 @@ namespace PepperDash.Essentials.Core
|
||||||
public override bool Deactivate()
|
public override bool Deactivate()
|
||||||
{
|
{
|
||||||
if (Port == null)
|
if (Port == null)
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
Port.SerialDataReceived -= Port_SerialDataReceived;
|
Port.SerialDataReceived -= Port_SerialDataReceived;
|
||||||
return Port.UnRegister() == eDeviceRegistrationUnRegistrationResponse.Success;
|
return Port.UnRegister() == eDeviceRegistrationUnRegistrationResponse.Success;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue