Jump to content

LED Fix


semaja2

Recommended Posts

Hi All,

Not sure if this is only an issue with the squirrels I recently obtained, but the inbuilt LED script had issues with anything under a 1 second blink time (eg. 999 instead of 1000) in which the LED would blinking every 1ms instead

This for me was due to the included BASH environment being unable to handle floating maths, a simple fix was to change it to use awk for this function

Simple change the line of code for the function convert() to the one below

function convert() {
        echo $(if [[ $1 -lt 20 ]]; then awk "BEGIN {print 20/1000}"; else awk "BEGIN {print $1/1000}"; fi)
}

Hopefully this helps, and if it is a bug in the firmware hopefully it can be fixed long term :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...