Giter Site home page Giter Site logo

ryaniftron / rotorhazard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rotorhazard/rotorhazard

0.0 0.0 0.0 8.06 MB

Multi-node video transmitter race timer for drone racing

License: Other

Python 47.19% C++ 7.55% JavaScript 13.08% HTML 27.09% CSS 4.38% Ruby 0.01% C 0.70%

rotorhazard's Issues

VRxController - Get Lock Status

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.

Multiple RH servers on same network causes reconnect loop

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.

VRxController - Get ESP32 Status (static and variable)

VRxController needs to query the status of the ESP32.
image

COS:

  • VRxC sends requests for status on startup of both variable and static

  • When ESP32 joins network, VRxC request for both status

  • VRxC subscribes to status and reads the json into rx_data

  • VRxC generates events when there is new data

Handle MQTT broker on different device

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

RH won't launch if MQTT server is not running

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.

RH is generating commands for targetting devices, not BC_ID

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.

Response error if ESP connects without VRx status

Steps to reproduce:

  • Start RH server and MQTT; wait for stable
  • Connect ESP without powering CV

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.