dev.enabled in deviceStopComm

Posted on
Wed Jan 24, 2018 12:00 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

dev.enabled in deviceStopComm

When dev comm Enabled is unchecked (= set to disable) in indigo main window, deviceStopComm() is called..

dev.enabled is till True .. I guess it is not commEnabled

what sets dev.enabled = False?

also there is no commEnabled in dev


Karl

Posted on
Wed Jan 24, 2018 12:58 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: dev.enabled in deviceStopComm

How are you looking at dev.enabled? Are you examining it in deviceStopComm()? I think you need to get an updated device object for some changes to show up.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Jan 24, 2018 2:04 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: dev.enabled in deviceStopComm

I was always under the impression that deviceStopComm() was to allow for anything that needed to be buttoned up *before* comm was disabled, and that dev.enabled would be set to False after deviceStopComm() was finished.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Jan 24, 2018 4:49 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: dev.enabled in deviceStopComm

Dave is correct – deviceStopComm is called before enabled is set to False. If you need to catch this case then you can use deviceUpdated() since it is passed the old and new device. In this case the old device would have enabled set to True and the new device instance would have it set to False.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest