Skip to content

Commit

Permalink
Autotest: Rover temp
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKear committed Dec 6, 2023
1 parent ad69ba7 commit 62b43ee
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Tools/autotest/rover.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,16 @@ def AC_Avoidance(self):

def ServoRelayEvents(self):
'''Test ServoRelayEvents'''
self.set_parameters({
"RELAY1_FUNCTION": 1, # Enable relay 1 as a standard relay pin
"RELAY1_PIN": 1, # Set pin number, 1 in SIM_MASK_PIN
"RELAY2_FUNCTION": 1, # Enable relay 2 as a standard relay pin
"RELAY2_PIN": 2, # Set pin number, 2 in SIM_MASK_PIN
"RELAY6_FUNCTION": 1, # Enable relay 6 as a standard relay pin
"RELAY6_PIN": 6, # Set pin number, 32 in SIM_MASK_PIN
})
self.reboot_sitl() # Needed for relay functions to take effect

for method in self.run_cmd, self.run_cmd_int:
self.context_push()
method(mavutil.mavlink.MAV_CMD_DO_SET_RELAY, p1=0, p2=0)
Expand Down Expand Up @@ -603,7 +613,7 @@ def ServoRelayEvents(self):
})

# add another servo:
self.set_parameter("RELAY6_PIN", 14)
# self.set_parameter("RELAY6_PIN", 14)
self.assert_received_message_field_values('RELAY_STATUS', {
"present": 35,
"on": 0,
Expand Down

0 comments on commit 62b43ee

Please sign in to comment.