Skip to content

Commit

Permalink
Fix radio state issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobeva committed Oct 25, 2024
1 parent ba367a4 commit 0bc2de3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions RNS/Interfaces/Android/RNodeMultiInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ def setLTALock(self, lt_alock, interface):
self.selected_index = interface.index

def setRadioState(self, state, interface):
self.state = state
#self.state = state
kiss_command = bytes([KISS.FEND])+bytes([interface.sel_cmd])+bytes([KISS.FEND])+bytes([KISS.FEND])+bytes([KISS.CMD_RADIO_STATE])+bytes([state])+bytes([KISS.FEND])
written = self.write_mux(kiss_command)
if written != len(kiss_command):
Expand Down Expand Up @@ -1038,7 +1038,7 @@ def readLoop(self):
if self.subinterfaces[self.selected_index] is not int:
self.subinterfaces[self.selected_index].r_state = byte
if self.subinterfaces[self.selected_index].r_state:
RNS.log(str(self)+" Radio reporting state is online", RNS.LOG_DEBUG)
RNS.log(str(self.subinterfaces[self.selected_index])+" Radio reporting state is online", RNS.LOG_DEBUG)
else:
RNS.log(str(self.subinterfaces[self.selected_index])+" Radio reporting state is offline", RNS.LOG_DEBUG)

Expand Down Expand Up @@ -1584,6 +1584,7 @@ def initRadio(self):
time.sleep(0.15)
self.parent_interface.setRadioState(KISS.RADIO_STATE_ON, self)
time.sleep(0.15)
self.state = KISS.RADIO_STATE_ON

if self.parent_interface.use_ble:
time.sleep(1)
Expand Down

0 comments on commit 0bc2de3

Please sign in to comment.