-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bunny_helper switch position #4
Conversation
…ths relative to payload/
@kevthehermit Shouldn't it follow the format of the other variables of all caps? |
You added a whole different module. You might want to rebase everything that isn't in bunny_helpers.sh. |
Yeah just spotted that after i pushed the commit. |
77d27f1
to
751c848
Compare
switch3=`cat /sys/class/gpio_sw/PL3/data` | ||
echo "--- switch1 = $switch1, switch2 = $switch2, switch3 = $switch3" | ||
if [ "x$switch1" = "x0" ] && [ "x$switch2" = "x1" ] && [ "x$switch3" = "x1" ]; then | ||
SWITCH_POSITION="switch1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the export
be done here?
if [ "x$switch1" = "x0" ] && [ "x$switch2" = "x1" ] && [ "x$switch3" = "x1" ]; then | ||
SWITCH_POSITION="switch1" | ||
elif [ "x$switch1" = "x1" ] && [ "x$switch2" = "x0" ] && [ "x$switch3" = "x1" ]; then | ||
SWITCH_POSITION="switch2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here... etc. instead of at the bottom because wouldn't the bottom one just reset the variable to blank?
Allows you to use $switchposition in payloads. Useful for building paths relative to payload/