Giter Site home page Giter Site logo

scottgchin / delta5_race_timer Goto Github PK

View Code? Open in Web Editor NEW
157.0 42.0 61.0 2.97 MB

Multi-node video transmitter race timer for drone racing

License: MIT License

Python 12.65% JavaScript 73.49% HTML 11.66% C++ 2.20%
raspberry-pi receiving-nodes race fpv vtx timer arduino vtx-lap-timing drone racing

delta5_race_timer's People

Contributors

ethomas997 avatar hazardcreative avatar lephiloux avatar punkkills avatar scottgchin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

delta5_race_timer's Issues

not working on rpi 4b and newest piOS

hello,
I am struggling on my raspberry pi 4B 8gb version with newest PiOS with desktop... unable to run server
there are multiple errors like flask is missing etc

Any idea how to solve it?

Map and constrain the RSSI value

The RSSI value can be over 255 which isn't handled well by i2c unless the number is conditioned. Possibly use the map() and constrain() functions to keep the values within range.

list index out of range

The delta5 timer was working yesterday, but today when I try and start it, the service exits with error list index out of range

journalctl -xe 
.....
Aug 20 02:34:01 delta5 python[724]: No node at address 8
Aug 20 02:34:01 delta5 python[724]: Node FOUND at address 10
Aug 20 02:34:01 delta5 python[724]: Node FOUND at address 12
Aug 20 02:34:01 delta5 python[724]: Node FOUND at address 14
Aug 20 02:34:01 delta5 python[724]: No node at address 16
Aug 20 02:34:01 delta5 python[724]: No node at address 18
Aug 20 02:34:01 delta5 python[724]: No node at address 20
Aug 20 02:34:01 delta5 python[724]: No node at address 22
Aug 20 02:34:01 delta5 python[724]: Traceback (most recent call last):
Aug 20 02:34:01 delta5 python[724]:   File "server.py", line 33, in <module>
Aug 20 02:34:01 delta5 python[724]:     INTERFACE = get_hardware_interface()
Aug 20 02:34:01 delta5 python[724]:   File "../delta5interface/Delta5Interface.py", line 343, in get_hardware_interface
Aug 20 02:34:01 delta5 python[724]:     return Delta5Interface()
Aug 20 02:34:01 delta5 python[724]:   File "../delta5interface/Delta5Interface.py", line 104, in __init__
Aug 20 02:34:01 delta5 python[724]:     self.set_calibration_threshold(node.index, self.calibration_threshold)
Aug 20 02:34:01 delta5 python[724]:   File "../delta5interface/Delta5Interface.py", line 270, in set_calibration_threshold
Aug 20 02:34:01 delta5 python[724]:     node = self.nodes[node_index]
Aug 20 02:34:01 delta5 python[724]: IndexError: list index out of range
Aug 20 02:34:01 delta5 systemd[1]: delta5.service: Main process exited, code=exited, status=1/FAILURE
Aug 20 02:34:01 delta5 systemd[1]: delta5.service: Unit entered failed state.
Aug 20 02:34:01 delta5 systemd[1]: delta5.service: Failed with result 'exit-code'.
Aug 20 02:34:07 delta5 kernel: Voltage normalised (0x00000000)

Not sure how to recover from this. How does self.nodes[node_index] go out of range?

hacker's question

I am delighted to find this excellent project.

In delta5node.ino it looks like there is a hard-coded i2cSlaveAddress. This is used for wire initialization, it is also printed for our convenience.

But there is also a mechanism for the master controller to interrogate the slave nodes for that address… but to do this, the address would already be known.

Car 54, what is your car number?

Or I am missing something probably. Is there a kind of master broadcast that is used to find all slaves?

alto777

Support more than 6 Nodes

right now the trqacker is limited to 6 nodes. Is it possible to change the code to support 8 nodes?

would be awesome!

Discard or highlight falsey laps

Add a method to mark or directly discard falsey laps.
Add a minimum lap time value to the race config.

Eg. A lap for some track cannot be less than 5 seconds so we mark it in order to delete it easily.
We could also add a bulk delete button with those times

Issue Getting Delta5 to work

I've been trying to get the app to run by following the Software Setup Guide, but when in the settings this error keeps occurring.
This only happens in the settings, and I'm unable to add pilots or heats.
None of python files were changed after cloning

Any help would be appreciated.
Thanks.

Client connected
connect handler error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/engineio/server.py", line 423, in _trigger_event
    return self.handlers[event](*args)
  File "/usr/local/lib/python2.7/dist-packages/socketio/server.py", line 503, in _handle_eio_connect
    return self._handle_connect(sid, '/')
  File "/usr/local/lib/python2.7/dist-packages/socketio/server.py", line 421, in _handle_connect
    self.environ[sid]) is False:
  File "/usr/local/lib/python2.7/dist-packages/socketio/server.py", line 490, in _trigger_event
    return self.handlers[namespace][event](*args)
  File "/usr/local/lib/python2.7/dist-packages/flask_socketio/__init__.py", line 251, in _handler
    *args)
  File "/usr/local/lib/python2.7/dist-packages/flask_socketio/__init__.py", line 632, in _handle_event
    ret = handler()
  File "server.py", line 339, in connect_handler
    emit_leaderboard() # Race page, load leaderboard for current laps
  File "server.py", line 835, in emit_leaderboard
    heat_id=RACE.current_heat, node_index=node).first().pilot_id
AttributeError: 'NoneType' object has no attribute 'pilot_id'

Event Summary (Standings)

would be nice to have an summary just like the one you are planning to do for the rounds page but for the entire event. with the ability to sort by columns

position by (rounds,laps,avg lap time or fastest lap)

Example
position -pilot name - Rounds completed - Laps - Average lap time - Fastest lap time

RSSI not working correctly

I have everything built and programmed as instructed. When I'm the GUI for LiveTime it shows all the nodes at 570(+-5) and no changes or spikes when I power up a transmitter. What'd I do wrong?

Improve phonetic readout of lap + time

Right now the phonetic readout of the pilot plus lap plus time is a bit hard to comprehend because the lap number bleeds into the time.

Example: "Paul lap one one minute five seconds"

I believe this is the line responsible:

var $ttstest = msg.pilot + " lap " + msg.lap + " " + msg.phonetic;

I am going to try modifying this function on our timer to something like this (to be tested still):

		socket.on('phonetic_data', function (msg) {
			//	var $ttstest = msg.pilot + " lap " + msg.lap + " " + msg.phonetic;

			var phoneticLap="";
			switch(msg.lap){
				case 1: phoneticLap = "st"; break;
				case 2: phoneticLap = "nd"; break;
				case 3: phoneticLap = "rd"; break;
				default: phoneticLap = "th"; break;
			}
			var $ttstest = msg.pilot + " " + msg.lap + phoneticLap + " lap " + msg.lap + " " + msg.phonetic;
	
			speak('<div class="speech">' + $ttstest + '</div> div.speech');				
		})

That should hopefully cause it to say: "Paul first lap one minute five seconds"

Add Filtering to the Rounds Page

The rounds page will become hard to navigate after a lot of races of been saved. Put a dropdown menu at the top to filter by heat.

installation not possible with Pyhton 2

With current RaspberryPi OS (recent install von 01.01.2021, Python 2.7.16) installation stops at bidict (No matching distribution found for bidict>=0.21.0) for python-socketio.

no such column polot.phonetic

I just upgraded my lap timer after sitting on a shelf for months. Now getting this error

OperationalError: (sqlite3.OperationalError) no such column: pilot.phonetic [SQL: u'SELECT pilot.id AS pilot_id_1, pilot.pilot_id AS pilot_pilot_id, pilot.callsign AS pilot_callsign, pilot.phonetic AS pilot_phonetic, pilot.name AS pilot_name \nFROM pilot \nWHERE pilot.pilot_id = ?\n LIMIT ? OFFSET ?'] [parameters: (1, 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8)

It seems like the database schema has changed, but I can't find any documentation or scripts to update it.

Create delta 5 github organization

I'm excited about the possibilities of delta 5, I want to help contribute. Have you considered making a github group called 'delta 5'?

Reasons why it may be a good idea:

  1. Looks more profesional (can have own logo)
  2. Can use github pages to host simple website
  3. If you have more than 1 git repo (which the automated raspberry pi images would be), it is cleaner to have them grouped together
  4. Github forwards links to scottgchin/delta5_race_timer so existing links won't break.

Here is an example of another project I've contributed to that uses a 'group' for all related repos:

https://github.com/home-assistant

Differences in the data the mock interface outputs vs the live one.

I've been trying to get livetime to support signal strength from delta5 but since when
--mock is used that data is not there they would like the mock interface to be changed
to match the live one.

I figured i'd check in and see if there was any interest in merging such a change
or if this repo is more or less completely idle at this point.

I'm willing to write the code myself and submit a pull request if there's interest.

Automatic Heat Creation

Add a function to automatically assign pilots to heats.

Look at adding a class/skill field for each pilot that would be used when assigning heats.

reset database doesn't work

Running the latest code as of a couple of days ago. When I click 'reset database' it asks me to login and then refreshes the page, but the database didn't reset because I still see pilots and heats.

47a3573

How does it integrate with live time?

I'm just learning what live time is. The documentation says

Alternatively, to use your Delta5 Race Timer hardware with 3rd party timing software, replace each reference of 'delta5server' with 'timingserver' in the following instructions.

Does live time run on the raspberry pi?

There have been some facebook discussions around switching between the delta 5 server and live time. I'm trying to figure out if there is a way to run both services simultaneously and use a proxy to route network traffic based on the source url.

Could you elaborate on why there is a need for 2 different services to be running?

Lipo Voltage Monitoring

Would be nice to have that option to check the Li-Po voltage and an alert when the voltage is low.
I know that it needs a PCB modification but could be easy to make.
Chorus Laptimer has the option and is using an analog input of the arduino for it.

receiver swamped

I am experimenting with the Delta5 concept and I observe that the RSSI from my receiver achieves a maximum output with the transmitter some distnace away - there is nothing like a peak to detect, it is a plateau.

So I came looking for a way to desensitize the receiver. Since I know nothing about RF, my experiments were only amusing failures. Never mind.

Or find sympathy, or assurances that it is just the truth. The implication would seem to be that Delta5 is only satifactory on larger tracks?

TIA

a7

Add an export saved races option

Ahead of multi event database management the next step would be a button to simply export the current saved races to a csv file.

Move Race Timing Clock to the Python Script

The race timing clock is currently javascript on the race page. It does not persist if the race director navigates away from the race page and then returns. Move the timing clock to a python function with socket io updates back to the race page as needed. This might involve needed a separate emit for each audio cue as well.

Add frequency Schemes and Make Changeable

HI
So this is my first open source project I am starting to help work on so please be kind. My idea is on the database page add a drop down for the different frequency schemes (IMD5, IMD6C, etc). I also want to make this changeable from the settings page, so it won't require clearing the DB to change the scheme.

I have already started working on this, just wanted to let people know.

I will probably need some help or advice once done merging it back.

Calibrated each node

Maby a idear,that we can calibrate each node, so the quality diffrence is not a issue anymore

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.