[SOLVED] QtDragon - Spindle at speed LED not working

More
2 years 11 months ago #286882 by bobyjx
I got the same issue.
I have followed this method for operation, but I have received an error:

“2023-12-01 00:15:17,932 - QTvcp.QTVCP.CORE - ERROR - Qhal: Error making new HAL pin:Invalid parameter
/usr/lib/python3/dist-packages/qtvcp/widgets/state_led.pyLine 86Function: _hal_init2023-12-01 00:15:17,933 - QTvcp.QTVCP.CORE - ERROR - Qhal: Traceback (most recent call last):File "/usr/lib/python3/dist-packages/qtvcp/core.py", line 154, in newpinp = QPin(_hal.component.newpin(self.comp, *a, **kw))^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^hal.error:Invalid parameter2023-12-01 00:15:17,932 - QTvcp.QTVCP.CORE - ERROR - Qhal: Error making new HAL pin: Invalid parameter /usr/lib/python3/dist-packages/qtvcp/widgets/state_led.pyLine 86Function: _hal_init2023-12-01 00:15:17,933 - QTvcp.QTVCP.CORE - ERROR - Qhal: Traceback (most recent call last):File "/usr/lib/python3/dist-packages/qtvcp/core.py", line 154, in newpinp = QPin(_hal.component.newpin(self.comp, *a, **kw))^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^hal.error: Invalid parameter ”

Here is my py file:
“print('\nUser command file for following spindle.0.at_speed\n')

# needed to instance patch
# reference: ruivieira.dev/python-monkey-patching-for-readability.html
import types

# import the handlerfile to get reference to it's libraries.
# use <screenname>_handler
import qtdragon_hd_handler as SELF

###############################################
# add hook to add a status request
###############################################
def before_loop__(self):
    try:

        self.w.hal_led_atspeed.setProperty('follow_halpin_state',True)
        self.w.hal_led_atspeed.setProperty('halpin_name','spindle.0.at-speed')
        self.w.hal_led_atspeed. _hal_init()
    except Exception as e:
        pass

# Here we are instance patching the original handler file to add a new
# function that calls our new function (of the same name)
# defined in this file
self.before_loop__ = types.MethodType(before_loop__, self)


”

Please Log in to join the conversation.

More
2 years 10 months ago #287567 by cmorley
Sorry I missed this - did you get it working?

Please Log in to join the conversation.

More
2 years 10 months ago #288828 by bobyjx
It's working fine, but I'm still getting this error

Please Log in to join the conversation.

More
2 years 10 months ago #288849 by cmorley
This added line should fix the error:
Code:
    try:         self.w.led_at_speed.setProperty('halpin_option',False)   # add this line         self.w.led_at_speed.setProperty('follow_halpin_state',True)         self.w.led_at_speed.setProperty('halpin_name','spindle.0.at-speed')         self.w.led_at_speed. _hal_init()     except Exception as e:         pass

Sorry that took so long.

Please Log in to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum