Skip to content

Commit

Permalink
update RX4R/RX6X with newer versions from RXxR-GRXx
Browse files Browse the repository at this point in the history
  • Loading branch information
oshmuely authored and oshmuely committed Apr 7, 2023
1 parent 210a7c8 commit 70198a2
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 28 deletions.
File renamed without changes.
File renamed without changes.
63 changes: 37 additions & 26 deletions packaging/files_name_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,49 @@

mapping_list = {
'X8R': ['X6R', 'X8R'],
'RX4R': ['RX4R', 'RX6R'],
'RXXR_GRXX': ['G-RX6', 'G-RX8'],
'RX8RPRO': ['RX8R-PRO'],
# 'RX4R': ['RX4R', 'RX6R'],
'RXXR_GRXX': ['G-RX6', 'G-RX8', 'RX4R', 'RX6R'],
}

ignored_list = ['RX4R', 'RX6R']

raw_dir = os.path.normpath(f'{SCRIPT_DIR}/../raw/')
to_dir = os.path.normpath(f'{SCRIPT_DIR}/..')
frk_list = os.listdir(raw_dir)

for from_name in frk_list:
to_name = from_name.lower()
g = re.match('(uni_)?(.*)_([a-z]*)(\d{2,3})([a-z]*)\.frk', to_name)
g1 = g.group(1)
rx_name = g.group(2).upper()
g3 = g.group(3)
ver = g.group(4)
g5 = g.group(5)

g3 = g3.replace('rom', '')
g5 = g5.replace('rom', '')
postfix = g3 + g5

if rx_name in mapping_list:
mapped_rxs = mapping_list[rx_name]
for mapped_rx in mapped_rxs:
to_name = f'uni_{mapped_rx}_v{ver}{postfix}.frk'


def main():
frk_list = os.listdir(raw_dir)

for from_name in frk_list:
to_name = from_name.lower()
g = re.match(r'(uni_)?(.*)_([a-z]*)(\d{2,3})([a-z]*)\.frk', to_name)
g1 = g.group(1)
rx_name = g.group(2).upper()
g3 = g.group(3)
ver = g.group(4)
g5 = g.group(5)

g3 = g3.replace('rom', '')
g5 = g5.replace('rom', '')
postfix = g3 + g5

if rx_name in ignored_list:
continue

if rx_name in mapping_list:
mapped_rxs = mapping_list[rx_name]
for mapped_rx in mapped_rxs:
to_name = f'uni_{mapped_rx}_v{ver}{postfix}.frk'
print(to_name)
shutil.copy2(f'{raw_dir}/{from_name}', f'{to_dir}/{to_name}')
else:
to_name = f'uni_{rx_name}_v{ver}{postfix}.frk'
print(to_name)
shutil.copy2(f'{raw_dir}/{from_name}', f'{to_dir}/{to_name}')
else:
to_name = f'uni_{rx_name}_v{ver}{postfix}.frk'

print(to_name)
shutil.copy2(f'{raw_dir}/{from_name}', f'{to_dir}/{to_name}')
pass


print(to_name)
pass
main()
Binary file removed raw/RX4R_75sm.frk
Binary file not shown.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ https://forum.alofthobbies.com/index.php?threads/uni-receiver-firmware-release-f
| XSR | xsr_rom57.frk |
| RX8R | rx8r_rom57.frk |
| RX8R-PRO | UNI_rx8rpro_59sm.frk |
| RX4R | RX4R_75sm.frk |
| RX6R | RX4R_75sm.frk |
| RX4R | UNI_RXxR_GRXx_78sm.frk |
| RX6R | UNI_RXxR_GRXx_78sm.frk |
| G-RX6 | UNI_RXxR_GRXx_78sm.frk |
| G-RX8 | UNI_RXxR_GRXx_78sm.frk |

Binary file added uni_RX4R_v78sm.frk
Binary file not shown.
Binary file added uni_RX6R_v78sm.frk
Binary file not shown.

2 comments on commit 70198a2

@Greggold
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Aloft website recommends RX6R rxs be flashed with RX4R_75sm.frk firmware. When I press "flash smartport" (on my qx7 tx) the rx gives a red light, then a green light, then a beep, and I get the message "FW update error. Device data refused." Am I using the wrong firmware?

@offer-shmuely
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @Greggold
I know that the post on the forum still show differently,
but Mike (the one who develop this firmware) recommend the UNI_RXxR_GRXx_78sm.frk, and he is not continuing with the RX4R_75sm.frk line.

Please sign in to comment.