Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

Commit

Permalink
Fix inverse switch
Browse files Browse the repository at this point in the history
  • Loading branch information
xnkevinnguyen committed Apr 20, 2020
1 parent f090660 commit b0c72ac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/adafruit_circuitplayground/express.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self):
(0, 0, 0),
]
self.__state[CONSTANTS.EXPRESS_STATE.RED_LED] = False
self.__state[CONSTANTS.EXPRESS_STATE.SWITCH] = False
self.__state[CONSTANTS.EXPRESS_STATE.SWITCH] = True
self.__state[CONSTANTS.EXPRESS_STATE.TEMPERATURE] = 0
self.__state[CONSTANTS.EXPRESS_STATE.LIGHT] = 0
self.__state[CONSTANTS.EXPRESS_STATE.MOTION_X] = 0
Expand Down
2 changes: 1 addition & 1 deletion src/view/components/cpx/CpxImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ export const updateSwitch = (switchState: boolean): void => {
if (switchElement && switchInner) {
svg.addClass(switchInner, "sim-slide-switch-inner");

if (switchState) {
if (!switchState) {
svg.addClass(switchInner, "on");
switchInner.setAttribute("transform", "translate(-5,0)");
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/view/components/cpx/CpxSimulator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const DEFAULT_CPX_STATE: ICpxState = {
[0, 0, 0],
],
red_led: false,
switch: false,
switch: true,
touch: [false, false, false, false, false, false, false],
shake: false,
};
Expand Down

0 comments on commit b0c72ac

Please sign in to comment.