ryaniftron / rotorhazard Goto Github PK
View Code? Open in Web Editor NEWThis project forked from rotorhazard/rotorhazard
Multi-node video transmitter race timer for drone racing
License: Other
This project forked from rotorhazard/rotorhazard
Multi-node video transmitter race timer for drone racing
License: Other
RH MQTT Client should identify itself device type as a lap timer. Add config option for the client name
During startup, the VRx OSD is not cleared. This should also occur on VRx connect.
When a race admin wants to change the frequency of a ClearView, nothing is preventing them from doing so when a pilot is flying and could cause them to crash.
As a safety mechanism, it should warn the admin of changing the frequency if the CV has a lock. When a receiver joins the network, its frequency may not align with what RH says that node is. Thus, implement a lock status request that RH can poll.
A receiver joining the network or changing nodes should be immediately sent the current frequency. (The VRx is allowed to delay actual changing of hardware settings until safe.)
If multiple RH servers exist on a network, each tries to establish a connection and kicks the other off, resulting in a reconnect loop.
RH should prevent connecting if running as a slave, but if possible this should be addressed elsewhere as well.
If running RotorHazard server, clearview needs to be up to date for the python package. This is a separate problem than having up to date ESP32's
Steps to reproduce:
The is unlikely to occur with hardware currently in development, but certainly possible with user-built modules for CV or other integrations. Can also occur if CV is disconnected without ESP disconnect (such as when monitoring ESP serial via USB an unplugging CV).
<-RotorHazard: VRxController-> Device CV_D40D7A286F24 is not yet configured by the server after a successful connection. Conducting some config now
<-RotorHazard: clearview.formatter-> Unable to match response '\xe0\xfc\x1c\xfc\xfc\xe0\xfc\xfc\xe0\xfc\x1c\xfc\xfc\xe0\xfc\xfc\xe0\xfc\x1c\xfc\xfc\xe0\xfc\x1c\xfc\xfc\xe0\xfc\xfc\xe0\xfc\xfc\xe0\xfc\xfc\xe0\xfc\xfc183' to any pattern
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File "C:\Python27\lib\threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "C:\Python27\lib\site-packages\paho\mqtt\client.py", line 3428, in _thread_main
self.loop_forever(retry_first_connection=True)
File "C:\Python27\lib\site-packages\paho\mqtt\client.py", line 1782, in loop_forever
rc = self.loop(timeout, max_packets)
File "C:\Python27\lib\site-packages\paho\mqtt\client.py", line 1177, in loop
rc = self.loop_read(max_packets)
File "C:\Python27\lib\site-packages\paho\mqtt\client.py", line 1568, in loop_read
rc = self._packet_read()
File "C:\Python27\lib\site-packages\paho\mqtt\client.py", line 2315, in _packet_read
rc = self._packet_handle()
File "C:\Python27\lib\site-packages\paho\mqtt\client.py", line 2952, in _packet_handle
return self._handle_publish()
File "C:\Python27\lib\site-packages\paho\mqtt\client.py", line 3228, in _handle_publish
self._handle_on_message(message)
File "C:\Python27\lib\site-packages\paho\mqtt\client.py", line 3416, in _handle_on_message
callback(self, self._userdata, message)
File "C:\Users\Hazard\Documents\GitHub\RotorHazard\src\server\VRxController.py", line 562, in on_message_resp_targeted
nt, pattern_response = clearview.formatter.match_response(payload)
TypeError: 'NoneType' object is not iterable
The startup of the broker should independent of the RH server. Assume either the RH server or the broker can be restarted at any point. Make available a method to see if connection to the broker is valid.
COS:
No crashes when either RH server or broker is restarted
Works fine when setup as a service file
Tested method to indicate broker connection that is available
Without an MQTT server running, during RH startup, server hangs after LED initialization. Then:
MQTT broker not alive at '192.168.0.242'
Traceback (most recent call last):
File "server.py", line 4982, in <module>
initVRxController()
File "server.py", line 4980, in initVRxController
5880,])
File "C:\Users\Hazard\Documents\GitHub\RotorHazard\src\server\VRxController.py", line 63, in __init__
subscribe_topics = None)
File "C:\Users\Hazard\Documents\GitHub\RotorHazard\src\server\VRxCV1_emulator.py", line 46, in __init__
self.initialize()
File "C:\Users\Hazard\Documents\GitHub\RotorHazard\src\server\VRxCV1_emulator.py", line 68, in initialize
raise e
socket.error: [Errno 10060] [Error 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Expected behavior: RH starts up normally, and backgrounds a process to periodically check for MQTT server. A status flag/event is needed for UI notification.
The CV API allows targeting a specific node number, but there is no reason to use it. The CV would also have to align with the ESP32 if that was the case. Because RH is not using serial connection to the ClearView's, add some logic to prevent using the node number inside the packet as the destination address and fix any code that does use it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.