Skip to content

Commit 3316169

Browse files
committed
wip: Continue osfv integration
Signed-off-by: Pawel Langowski <[email protected]>
1 parent 291c354 commit 3316169

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

osfv_cli/src/osfv/libs/rte.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ def relay_set(self, relay_state):
137137
gpio_state = None
138138
if relay_state == 'on':
139139
gpio_state = 'high'
140-
if relay_state == 'low':
141-
gpio_state = 'off'
140+
if relay_state == 'off':
141+
gpio_state = 'low'
142142
self.gpio_set(self.GPIO_RELAY, gpio_state)
143143

144144
def reset_cmos(self):

osfv_cli/src/osfv/rf/rte_robot.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ def rte_reset(self, time=1):
8585

8686
@keyword(types=None)
8787
def rte_gpio_get(self, gpio_no):
88-
state = self.rte.gpio_get(gpio_no)
88+
state = self.rte.gpio_get(int(gpio_no))
8989
robot.api.logger.info(f"GPIO {gpio_no} state: {state}")
9090
return state
9191

9292
@keyword(types=None)
9393
def rte_gpio_set(self, gpio_no, state):
94-
self.rte.gpio_set(gpio_no, state)
95-
state = self.rte.gpio_get(gpio_no)
94+
self.rte.gpio_set(int(gpio_no), state)
95+
state = self.rte.gpio_get(int(gpio_no))
9696
robot.api.logger.info(f"GPIO {gpio_no} state set to {state}")

0 commit comments

Comments
 (0)