Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added T-Beam GPS option #590

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 48 additions & 3 deletions RNS/Utilities/rnodeconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ class ROM():
PRODUCT_TBEAM = 0xE0
MODEL_E4 = 0xE4
MODEL_E9 = 0xE9
MODEL_E9_GPS = 0xE7
MODEL_E3 = 0xE3
MODEL_E8 = 0xE8


PRODUCT_TBEAM_S_V1= 0xEA
MODEL_DB = 0xDB
Expand Down Expand Up @@ -281,6 +283,7 @@ class ROM():
0xC5: [420000000, 520000000, 21, "420 - 520 MHz", "rnode_firmware_heltec32v3.zip", "SX1262"],
0xCA: [850000000, 950000000, 21, "850 - 950 MHz", "rnode_firmware_heltec32v3.zip", "SX1262"],
0xE4: [420000000, 520000000, 17, "420 - 520 MHz", "rnode_firmware_tbeam.zip", "SX1278"],
0xE7: [850000000, 950000000, 17, "850 - 950 MHz", "rnode_firmware_tbeam_GPS.zip", "SX1276 w/ GPS"],
0xE9: [850000000, 950000000, 17, "850 - 950 MHz", "rnode_firmware_tbeam.zip", "SX1276"],
0xD4: [420000000, 520000000, 22, "420 - 520 MHz", "rnode_firmware_tdeck.zip", "SX1268"],
0xD9: [850000000, 950000000, 22, "850 - 950 MHz", "rnode_firmware_tdeck.zip", "SX1262"],
Expand Down Expand Up @@ -1994,9 +1997,10 @@ def print_donation_block():
print("\nWhat band is this T-Beam for?\n")
print("[1] 433 MHz (with SX1278 chip)")
print("[2] 868/915/923 MHz (with SX1276 chip)")
print("[3] 868/915/923 MHz (with SX1276 chip) GPS Enabled")
print("");
print("[3] 433 MHz (with SX1268 chip)")
print("[4] 868/915/923 MHz (with SX1262 chip)")
print("[4] 433 MHz (with SX1268 chip)")
print("[5] 868/915/923 MHz (with SX1262 chip)")
print("\n? ", end="")
try:
c_model = int(input())
Expand All @@ -2009,9 +2013,12 @@ def print_donation_block():
selected_model = ROM.MODEL_E9
selected_platform = ROM.PLATFORM_ESP32
elif c_model == 3:
selected_model = ROM.MODEL_E3
selected_model = ROM.MODEL_E9_GPS
selected_platform = ROM.PLATFORM_ESP32
elif c_model == 4:
selected_model = ROM.MODEL_E3
selected_platform = ROM.PLATFORM_ESP32
elif c_model == 5:
selected_model = ROM.MODEL_E8
selected_platform = ROM.PLATFORM_ESP32
except Exception as e:
Expand Down Expand Up @@ -2513,6 +2520,42 @@ def get_flasher_call(platform, fw_filename):
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.bin",
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.partitions",
]
elif fw_filename == "rnode_firmware_tbeam_GPS.zip":
if numeric_version >= 1.55:
return [
sys.executable, flasher,
"--chip", "esp32",
"--port", args.port,
"--baud", args.baud_flash,
"--before", "default_reset",
"--after", "hard_reset",
"write_flash", "-z",
"--flash_mode", "dio",
"--flash_freq", "80m",
"--flash_size", "4MB",
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam_GPS.boot_app0",
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam_GPS.bootloader",
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam_GPS.bin",
"0x210000",UPD_DIR+"/"+selected_version+"/console_image.bin",
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam_GPS.partitions",
]
else:
return [
sys.executable, flasher,
"--chip", "esp32",
"--port", args.port,
"--baud", args.baud_flash,
"--before", "default_reset",
"--after", "hard_reset",
"write_flash", "-z",
"--flash_mode", "dio",
"--flash_freq", "80m",
"--flash_size", "4MB",
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam_GPS.boot_app0",
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam_GPS.bootloader",
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam_GPS.bin",
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam_GPS.partitions",
]
elif fw_filename == "rnode_firmware_tbeam_sx1262.zip":
if numeric_version >= 1.55:
return [
Expand Down Expand Up @@ -3532,6 +3575,8 @@ def get_flasher_call(platform, fw_filename):
model = ROM.MODEL_B4
elif mapped_model == ROM.MODEL_B9_TCXO:
model = ROM.MODEL_B9
elif mapped_model == ROM.MODEL_E9_GPS:
model = ROM.MODEL_E9
else:
model = mapped_model
else:
Expand Down
Loading