Search Results

by Nadav
Thu Apr 11, 2019 12:53 pm
Forum: Python
Topic: Issues with exiting
Replies: 5
Views: 9417

Re: Issues with exiting

jdecoux wrote:You can call:

Code: Select all

Phidget.resetLibrary()
Is there a Phidget 22 equivalent?
by Nadav
Sun Mar 03, 2019 3:49 pm
Forum: Python
Topic: High CPU Utilization
Replies: 2
Views: 7225

Re: High CPU Utilization

Phidget Library 1.0.0.20190228 resolves this issue - CPU is now at 5% for 3 x 1012s - Thanks Patrick.
This also fixes kernel error "Internal error: Oops: 5 [#1] SMP ARM" that occurred on high load.
by Nadav
Sat Feb 23, 2019 4:37 pm
Forum: Python
Topic: High CPU Utilization
Replies: 2
Views: 7225

Re: High CPU Utilization

Have reinstalled Raspbian Stretch Lite and the Phidget libraries from scratch, and am still seeing this issue.
Have tried with two separate Pi2 Model B's.
Anyone else running a Raspberry?
by Nadav
Sat Feb 23, 2019 4:33 pm
Forum: Python
Topic: Dynamically Creating Channel Class Instance
Replies: 3
Views: 6696

Re: Dynamically Creating Channel Class Instance

Thanks for the suggestion. Here is working code (without error-handling): klass = ch_readonly.getChannelClassName() python_klass_name = klass.split('Phidget')[1] ch_new = getattr(importlib.import_module('Phidget22.Devices.' + python_klass_name), python_klass_name)() # Set handlers, and remember to c...
by Nadav
Tue Feb 12, 2019 7:05 pm
Forum: Python
Topic: High CPU Utilization
Replies: 2
Views: 7225

High CPU Utilization

I am seeing high CPU utilization of 34% in steady state. Hardware: Raspberry Pi 3 Phidgets: 3 x 1012 Phidget library: 22-1.0.0.2019012 Rasbian firwmare: Linux 4.14.97-v7+ #1197 Test Code: attached (renamed to txt extension to allow upload). While CPU goes down to 20% if not storing the attached chan...
by Nadav
Wed Jan 16, 2019 2:19 am
Forum: Python
Topic: Dynamically Creating Channel Class Instance
Replies: 3
Views: 6696

Dynamically Creating Channel Class Instance

Per the API docs, channels returned by Manager OnAttach handlers are read-only objects, and the developer should create new instances of the correct type. My question is, is there a way to dynamically create the correct type? Cannot use ch.__class__ as it is always an instance of class Phidget. Is i...
by Nadav
Wed Jan 16, 2019 2:06 am
Forum: Python
Topic: getState raises exception 51 (Unknown Value)
Replies: 3
Views: 6531

Re: getState raises exception 51 (Unknown Value)

Root cause was not calling channel.close() during process termination. This caused intermittent exceptions the next time the process was started. Can this be better handled by the Phidget Python library itself, by registering to atexit ? See https://stackoverflow.com/questions/3850261/doing-somethin...
by Nadav
Thu Jan 10, 2019 12:41 am
Forum: Python
Topic: getState raises exception 51 (Unknown Value)
Replies: 3
Views: 6531

getState raises exception 51 (Unknown Value)

With an 1012 i/o board, in the channel attach event, calling the channel getState sometime returns exception 51 EPHIDGET_UNKNOWNVAL. It is not consistent - sometimes it happens, sometimes not. Stack trace: File "/home/pi/Envs/djhome/lib/python3.6/site-packages/Phidget22/Devices/DigitalInput.py&...
by Nadav
Thu Jan 10, 2019 12:34 am
Forum: Python
Topic: getChannelClassName fail if channel detached
Replies: 2
Views: 5560

Re: getChannelClassName fail if channel detached

Thanks so much!
by Nadav
Tue Jan 08, 2019 3:27 pm
Forum: Python
Topic: getChannelClassName fail if channel detached
Replies: 2
Views: 5560

getChannelClassName fail if channel detached

getChannelClass succeeds even if channel is detached.
But getChannelClassName fails if channel is detached.
Is this by design?

(yes, I can use just ChannelClass, but the code and logs are more readable using ChannelClassName)