mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
moved from upshift downshift to speed level int
This commit is contained in:
parent
3574f76a79
commit
33ad50fbe2
2 changed files with 2 additions and 13 deletions
|
@ -219,9 +219,11 @@ class ARQSessionIRS(arq_session.ARQSession):
|
|||
|
||||
# Adjust the speed level by one step towards the appropriate level, if needed
|
||||
if appropriate_speed_level > self.speed_level and self.speed_level < len(self.SPEED_LEVEL_DICT) - 1:
|
||||
# we need to ensure, the received data is equal to our speed level before changing it
|
||||
if received_speed_level == self.speed_level:
|
||||
self.speed_level += 1
|
||||
elif appropriate_speed_level < self.speed_level and self.speed_level > 0:
|
||||
# we need to ensure, the received data is equal to our speed level before changing it
|
||||
if received_speed_level == self.speed_level:
|
||||
self.speed_level -= 1
|
||||
|
||||
|
|
|
@ -119,7 +119,6 @@ class ARQSessionISS(arq_session.ARQSession):
|
|||
# Log the speed level change if it's different from the current speed level
|
||||
if new_speed_level != self.speed_level:
|
||||
self.log(f"Changing speed level from {self.speed_level} to {new_speed_level}", isWarning=True)
|
||||
self.previous_speed_level = self.speed_level # Store the current speed level as previous
|
||||
self.speed_level = new_speed_level # Update the current speed level
|
||||
else:
|
||||
self.log("Received speed level is the same as the current speed level.", isWarning=True)
|
||||
|
@ -128,18 +127,6 @@ class ARQSessionISS(arq_session.ARQSession):
|
|||
else:
|
||||
self.log("No speed level specified in the received frame.", isWarning=True)
|
||||
|
||||
# Apply the new decode mode based on the updated speed level, including the previous speed level
|
||||
modes_to_decode = {
|
||||
self.get_mode_by_speed_level(self.speed_level).value: True,
|
||||
}
|
||||
# Include the previous speed level mode if it's different from the current
|
||||
if hasattr(self, 'previous_speed_level') and self.previous_speed_level != self.speed_level:
|
||||
modes_to_decode[self.get_mode_by_speed_level(self.previous_speed_level).value] = True
|
||||
|
||||
self.log(f"Modes to Decode: {list(modes_to_decode.keys())}", isWarning=True)
|
||||
# Apply the new decode mode based on the current and previous speed levels
|
||||
self.modem.demodulator.set_decode_mode(modes_to_decode)
|
||||
|
||||
def send_info(self, irs_frame):
|
||||
# check if we received an abort flag
|
||||
if irs_frame["flag"]["ABORT"]:
|
||||
|
|
Loading…
Reference in a new issue