zelogik / RicinoNext

A Robitronic compatible Lap Counter.
GNU General Public License v3.0
15 stars 6 forks source link

Backend don't reset every data after first run. #14

Closed zelogik closed 2 years ago

zelogik commented 2 years ago

todo:

Edit: Backend don't even send every player....

zelogik commented 2 years ago

c197434239cf1005e05e09476e167f9184a4d048 and 34e4f622c3a295fe149ac61bfd0b413969654e38

Should be ok, need more test

@Peck07 : could you test and forward me please if you see bad behavior on frontend side. (time/last/best/current) Broadcast reset is really fun and a nice to have feature :-D (just check number player change, and current line filled, is resetting everytime max lines is not so bad ? ie: const uint8_t players_max = NUMBER_RACER_MAX;, should be added in the {conf}, because depending of the board (esp32/esp8266/samd/avr)

Todo.... (so much todo...), a clean way to "secure" a little bit as, give priority on the frontend who has clicked on "start" for example and so, lock every other button on other client/frontend.. pioufffff, not really a priority, just a cool feature no?

@Peck07 :1st_place_medal: Ready for the first "almost" fully working RicinoNext ? :-D, what i mean is we almost have a "playable" version, only real hardware now, but not the harder part imo. (has already said, i2c version(the pcb in this repo) already worked in old version)

Peck07 commented 2 years ago

Just tested it, seems to be good.

"todo: disable start": I don't think we should disable the other clients, I mean other clients could stop the race as well. other than that: the lap slider is already disabled when a race is runninng :) but the new players/gates are not disabled.

"Ready for the first "almost" fully working RicinoNext ? :-D" Almost :) I've ordered the PCB for receiver/controller as well + IrDa, and uC, maybe I'm still missing something... but most of the parts are on their way to me.

zelogik commented 2 years ago

I don't know for the "secure" side, maybe allow others client only if the client who have "pushed" start is disconnect.. but neverming it's not really a must have feature for the moment Yes need to factorizing slider/lap code on the JS side. each if condition is "meh"...as the {conf} should always be full, maybe change to array... need to be defined.. later ;-D

Strange because sometimes I don't have zero value in last/best row but the value from the last race...

Have you added quartz ? or more precisely 16mhz resonator

Just have checked my ali basket.

And the last

Sorry link are in french ;-D And impressive ... I have quickly checked the price... everything have increased between 15 to 40% 8-(

Edit: Remember: Could be good to complete the wiki with all that informations .... later... Edit: FYI, I just started to add I2C code and view if every old functioning functions compiling (and how much size it's took in flash) (it's only 5 really small functions finally) Give us 33% available flash memory available now on the backend side considering that we already have: WIFI stuff (and there is lot) / json / i2c / sorting algo / race algo so mainly everything, we have plenty space available on the backend side Edit: esp8266 doesn't compile at this time. problem about wrong #define

Peck07 commented 2 years ago

Thanks! I was missing the resonator - IR LED still. Also I will probably direct solder the receivers, as jlcpcb didn't have the connectors :(

"reprogramme emitter ID code" that would be awesome! but the emitter has a simple infra LED, right (so it can't receive)?

Wiki:

zelogik commented 2 years ago

Strange, connectors was available and already soldered from jlcpcb... (remembering that cost labor time extension from jlcpcb)

"reprogramme emitter ID code" that would be awesome! but the emitter has a simple infra LED, right (so it can't receive)?

... facepalm... confusing with lap-Z transponder. But I have forgotten than we can reset if the pin PINA & B01000000 is low at start (check datasheet because I don't remember witch one it is) :-D And profit from my wonderful random ID generator (need test if we use full 10bit if I remembering well)

Wiki: yes I know, many things to done on the wiki, but yes add the attinyX4 on the arduino IDE, add real PIN on the software

Peck07 commented 2 years ago

They were just short on supply I guess. I think I've got connectors on the Controller, but not on the Receivers :)

zelogik commented 2 years ago

Have lost so many hair with that emitter code, but was so fun!!!

COnnector are not mandatory, just useful when setting the hardware :-D

The discussion tab could be good ressources too, and don't hesitate to start wiki (question) when you have some struggle, so I can complete.

Peck07 commented 2 years ago

Success! :) at least the LED is blinking. I think I'll just extend the README.md, so it will be easily accessible for everyone.

zelogik commented 2 years ago

You already have hardware? receiver/emitter at home ? :-D

ie: I reading old code on the I2C, and will merge I2C integration soon.

Peck07 commented 2 years ago

Only the emitter, but stilld don't have the IR LEDs.

zelogik commented 2 years ago

duplicate #28

zelogik commented 2 years ago

29 Fix