mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-06-23 12:24:30 -07:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 080216bd55 | |||
| aa37172293 | |||
| 5836d7f8ba |
@@ -73,6 +73,7 @@ class KISS():
|
||||
CMD_STAT_PHYPRM = 0x26
|
||||
CMD_STAT_BAT = 0x27
|
||||
CMD_STAT_CSMA = 0x28
|
||||
CMD_STAT_TEMP = 0x29
|
||||
CMD_BLINK = 0x30
|
||||
CMD_RANDOM = 0x40
|
||||
CMD_FB_EXT = 0x41
|
||||
@@ -444,6 +445,7 @@ class RNodeInterface(Interface):
|
||||
self.bitrate = 0
|
||||
self.st_alock = st_alock
|
||||
self.lt_alock = lt_alock
|
||||
self.cpu_temp = None
|
||||
self.platform = None
|
||||
self.display = None
|
||||
self.mcu = None
|
||||
@@ -487,6 +489,7 @@ class RNodeInterface(Interface):
|
||||
self.r_csma_cw_max = None
|
||||
self.r_current_rssi = None
|
||||
self.r_noise_floor = None
|
||||
self.r_temperature = None
|
||||
|
||||
self.r_battery_state = RNodeInterface.BATTERY_STATE_UNKNOWN
|
||||
self.r_battery_percent = 0
|
||||
@@ -516,7 +519,7 @@ class RNodeInterface(Interface):
|
||||
RNS.log("Invalid frequency configured for "+str(self), RNS.LOG_ERROR)
|
||||
self.validcfg = False
|
||||
|
||||
if (self.txpower < 0 or self.txpower > 22):
|
||||
if (self.txpower < 0 or self.txpower > 37):
|
||||
RNS.log("Invalid TX power configured for "+str(self), RNS.LOG_ERROR)
|
||||
self.validcfg = False
|
||||
|
||||
@@ -1358,6 +1361,22 @@ class RNodeInterface(Interface):
|
||||
bat_percent = 0
|
||||
self.r_battery_state = command_buffer[0]
|
||||
self.r_battery_percent = bat_percent
|
||||
elif (command == KISS.CMD_STAT_TEMP):
|
||||
if (byte == KISS.FESC):
|
||||
escape = True
|
||||
else:
|
||||
if (escape):
|
||||
if (byte == KISS.TFEND):
|
||||
byte = KISS.FEND
|
||||
if (byte == KISS.TFESC):
|
||||
byte = KISS.FESC
|
||||
escape = False
|
||||
command_buffer = command_buffer+bytes([byte])
|
||||
if (len(command_buffer) == 1):
|
||||
temp = command_buffer[0]-120
|
||||
if temp >= -30 and temp <= 90: self.r_temperature = temp
|
||||
else: self.r_temperature = None
|
||||
self.cpu_temp = self.r_temperature
|
||||
elif (command == KISS.CMD_RANDOM):
|
||||
self.r_random = byte
|
||||
elif (command == KISS.CMD_PLATFORM):
|
||||
|
||||
@@ -64,6 +64,7 @@ class KISS():
|
||||
CMD_STAT_PHYPRM = 0x26
|
||||
CMD_STAT_BAT = 0x27
|
||||
CMD_STAT_CSMA = 0x28
|
||||
CMD_STAT_TEMP = 0x29
|
||||
CMD_BLINK = 0x30
|
||||
CMD_RANDOM = 0x40
|
||||
CMD_FB_EXT = 0x41
|
||||
@@ -213,6 +214,7 @@ class RNodeInterface(Interface):
|
||||
self.bitrate = 0
|
||||
self.st_alock = st_alock
|
||||
self.lt_alock = lt_alock
|
||||
self.cpu_temp = None
|
||||
self.platform = None
|
||||
self.display = None
|
||||
self.mcu = None
|
||||
@@ -257,6 +259,7 @@ class RNodeInterface(Interface):
|
||||
|
||||
self.r_battery_state = RNodeInterface.BATTERY_STATE_UNKNOWN
|
||||
self.r_battery_percent = 0
|
||||
self.r_temperature = None
|
||||
self.r_framebuffer = b""
|
||||
self.r_framebuffer_readtime = 0
|
||||
self.r_framebuffer_latency = 0
|
||||
@@ -280,7 +283,7 @@ class RNodeInterface(Interface):
|
||||
RNS.log("Invalid frequency configured for "+str(self), RNS.LOG_ERROR)
|
||||
self.validcfg = False
|
||||
|
||||
if (self.txpower < 0 or self.txpower > 22):
|
||||
if (self.txpower < 0 or self.txpower > 37):
|
||||
RNS.log("Invalid TX power configured for "+str(self), RNS.LOG_ERROR)
|
||||
self.validcfg = False
|
||||
|
||||
@@ -985,6 +988,22 @@ class RNodeInterface(Interface):
|
||||
bat_percent = 0
|
||||
self.r_battery_state = command_buffer[0]
|
||||
self.r_battery_percent = bat_percent
|
||||
elif (command == KISS.CMD_STAT_TEMP):
|
||||
if (byte == KISS.FESC):
|
||||
escape = True
|
||||
else:
|
||||
if (escape):
|
||||
if (byte == KISS.TFEND):
|
||||
byte = KISS.FEND
|
||||
if (byte == KISS.TFESC):
|
||||
byte = KISS.FESC
|
||||
escape = False
|
||||
command_buffer = command_buffer+bytes([byte])
|
||||
if (len(command_buffer) == 1):
|
||||
temp = command_buffer[0]-120
|
||||
if temp >= -30 and temp <= 90: self.r_temperature = temp
|
||||
else: self.r_temperature = None
|
||||
self.cpu_temp = self.r_temperature
|
||||
elif (command == KISS.CMD_RANDOM):
|
||||
self.r_random = byte
|
||||
elif (command == KISS.CMD_PLATFORM):
|
||||
|
||||
@@ -1012,7 +1012,7 @@ class RNodeSubInterface(Interface):
|
||||
RNS.log("Invalid interface type configured for "+str(self), RNS.LOG_ERROR)
|
||||
self.validcfg = False
|
||||
|
||||
if (self.txpower < -9 or self.txpower > 27):
|
||||
if (self.txpower < -9 or self.txpower > 37):
|
||||
RNS.log("Invalid TX power configured for "+str(self), RNS.LOG_ERROR)
|
||||
self.validcfg = False
|
||||
|
||||
|
||||
@@ -1028,6 +1028,9 @@ class Reticulum:
|
||||
if hasattr(interface, "r_noise_floor"):
|
||||
ifstats["noise_floor"] = interface.r_noise_floor
|
||||
|
||||
if hasattr(interface, "cpu_temp"):
|
||||
ifstats["cpu_temp"] = interface.cpu_temp
|
||||
|
||||
if hasattr(interface, "cpu_load"):
|
||||
ifstats["cpu_load"] = interface.cpu_load
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ models = {
|
||||
0xC9: [850000000, 950000000, 17, "850 - 950 MHz", "rnode_firmware_heltec32v2.zip", "SX1276"],
|
||||
0xC5: [420000000, 520000000, 22, "420 - 520 MHz", "rnode_firmware_heltec32v3.zip", "SX1268"],
|
||||
0xCA: [850000000, 950000000, 22, "850 - 950 MHz", "rnode_firmware_heltec32v3.zip", "SX1262"],
|
||||
0xC8: [850000000, 950000000, 22, "850 - 950 MHz", "rnode_firmware_heltec32v4pa.zip", "SX1262"],
|
||||
0xC8: [860000000, 930000000, 28, "850 - 950 MHz", "rnode_firmware_heltec32v4pa.zip", "SX1262"],
|
||||
0xC6: [420000000, 520000000, 22, "420 - 520 MHz", "rnode_firmware_heltec_t114.zip", "SX1268"],
|
||||
0xC7: [850000000, 950000000, 22, "850 - 950 MHz", "rnode_firmware_heltec_t114.zip", "SX1262"],
|
||||
0xE4: [420000000, 520000000, 17, "420 - 520 MHz", "rnode_firmware_tbeam.zip", "SX1278"],
|
||||
@@ -1737,7 +1737,7 @@ def main():
|
||||
print("[7] Heltec LoRa32 v2")
|
||||
print("[8] Heltec LoRa32 v3")
|
||||
print("[9] Heltec LoRa32 v4")
|
||||
print("[10] LilyGO LoRa T3S3")
|
||||
print("[10] LilyGO LoRa T3S3")
|
||||
print("[11] RAK4631")
|
||||
print("[12] LilyGo T-Echo")
|
||||
print("[13] LilyGO T-Beam Supreme")
|
||||
@@ -4096,8 +4096,8 @@ def main():
|
||||
print("cases, and copies of the source code for both the RNode Firmware,")
|
||||
print("Reticulum and other utilities.")
|
||||
print("")
|
||||
print("To activate the RNode Bootstrap Console, power up your RNode and press")
|
||||
print("the reset button twice with a one second interval. The RNode will now")
|
||||
print("To activate the RNode Bootstrap Console, power up your RNode and hold")
|
||||
print("down the user button for 10+ seconds, then release. The RNode will now")
|
||||
print("reboot into console mode, and activate a WiFi access point for you to")
|
||||
print("connect to. The console is then reachable at: http://10.0.0.1")
|
||||
print("")
|
||||
|
||||
@@ -336,6 +336,10 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
||||
if ifstat["cpu_load"] != None: print(" CPU load : {v} %".format(v=str(ifstat["cpu_load"])))
|
||||
else: print(" CPU load : Unknown")
|
||||
|
||||
if "cpu_temp" in ifstat:
|
||||
if ifstat["cpu_temp"] != None: print(" CPU temp : {v}°C".format(v=str(ifstat["cpu_temp"])))
|
||||
else: print(" CPU load : Unknown")
|
||||
|
||||
if "mem_load" in ifstat:
|
||||
if ifstat["cpu_load"] != None: print(" Mem usage : {v} %".format(v=str(ifstat["mem_load"])))
|
||||
else: print(" Mem usage : Unknown")
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
__version__ = "1.0.1"
|
||||
__version__ = "1.0.2"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user