Closed rananna closed 3 years ago
About the LEDs, yes, it seems a lot of power!! And that power for each color, do you think they are bright enough? If they more than enough then maybe we can use PWM and use like 66% of the power? -- also, when combining a color, could be nice to reduce each one to 33% so total is 100% and not 300% -- this is just one idea, I do not know if PWM work on the LED pins but if it works, should not need extra processing power.
If we could make PWM working, maybe could be good for you to measure the same but like 50% to see if the current goes to near half of the 100% that you did measure.
I think motor should should turn on with a long press and turn off with the same long press. The startup process, including TSDZ2 startup takes some seconds and since is critical that user do not touch the pedals... I am thinking on this:
I think that we should send a value / command by ANT to power on and other to power off. We also need to get status of the power on status by ANT. We need to find an efficient way to do all this. This commands and status should be the same sent by Bluetooth, by the mobile app.
Yes, the leds are really bright, and I think we could easily live with some dimming with Pwm, as long as the overhead for the clock doesn't eat up too much power. I will try it and let you know..
Regarding power On/0ff, why not use a bit in page 16 ack command? All data would be accessible by the remote and leds could be set as you describe. There is a System State bit field discussed in table 5.5 of can't lev docs. Maybe use bit 2 for low beam / high beam for power on/off? Status bits for power (not ready/ready) could be turn signal left (bit 1) in the system State bit field since we are unlikely to use this. Another available data field is "current regenerative level" in the travel mode State bit field (0-7 values like assist level, see table 5-4) that we could use for power on/off and status.
@casainho , I had to delete my fork, and start again with a new fork to avoid conflicts with a couple of files that would have required manual processing. I wish I understood enough about github to avoid this issue in future! Anyway, here are the changes in this PR: