General HAL Output

More
02 Jan 2021 02:19 #193788 by phillc54
General HAL Output was created by phillc54
I am having trouble trying to get a hal output to accept a float value:
widget.hal_pin.set(0.1)
has no effect. It will change if I use an int.

I have tried initial state checked and unchecked - I have no idea what that means.
Attachments:

Please Log in or Create an account to join the conversation.

More
02 Jan 2021 03:38 - 02 Jan 2021 03:39 #193794 by cmorley
Replied by cmorley on topic General HAL Output
pushed the fix for scaling and fix the initial value option.

use:
widget.pin_value_update(value)
for s32/float values

which is a little awkward - I didn't intend it for direct manipulation but for using signals/slots set in designer from widgets that haven't been 'hali-fied'

Can you tell me what you are doing so I can improve the widget or advise a different solution?
Last edit: 02 Jan 2021 03:39 by cmorley.

Please Log in or Create an account to join the conversation.

More
02 Jan 2021 03:43 #193795 by phillc54
Replied by phillc54 on topic General HAL Output
As usual I am doing something differently...

I have an override (that uses 0.1 increments/decrements) that I want to flash the text on if the override value is not 0. I originally had a label but need a hal pin for the value. I changed to a doublespinbox but it was difficult to get the flash working so then I thought a haloutput would work, which does everything else fine except for setting the float value.

Please Log in or Create an account to join the conversation.

More
02 Jan 2021 03:48 #193797 by cmorley
Replied by cmorley on topic General HAL Output
It should work fine for you now - but why don't you just make a HAL pin in the handler for this?

Please Log in or Create an account to join the conversation.

More
02 Jan 2021 03:51 #193798 by phillc54
Replied by phillc54 on topic General HAL Output

It should work fine for you now - but why don't you just make a HAL pin in the handler for this?


I have no excuse other than I didn't think of doing that. :blush:

Please Log in or Create an account to join the conversation.

More
02 Jan 2021 03:53 #193799 by cmorley
Replied by cmorley on topic General HAL Output
lol
Isn't it annoying when someone does that to you!

But hey it got the widget fixed - thank you.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
02 Jan 2021 03:56 #193800 by phillc54
Replied by phillc54 on topic General HAL Output

Isn't it annoying when someone does that to you!

Haha, yes, I often overthink things and end up lost...
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.100 seconds
Powered by Kunena Forum