collin80 / GVRET

Generalized Vehicle Reverse Engineering Tool - firmware for Arduino Due based boards
99 stars 32 forks source link

added LED setting command #4

Closed yoh-there closed 9 years ago

yoh-there commented 9 years ago

Added a function to set the LED pins, as my hardware only has one LED wired to the outside of the enclosure. I hope you consider merging it in.

(note: I am wrapping my head around working with git - this is really my first ever. If I did something intensly stupid in the proces, let me know please. If this the way, I will of course submit every contribution like this)

collin80 commented 9 years ago

You submitted the request properly and this is the right way to do it. So, you can continue to do it this way in the future.

However, the LED definitions aren't getting saved because they aren't in the main EEPROM stored settings but rather were placed into a structure that is configured at run time based on which board you said you were using. The LEDs could be saved to EEPROM with some modifications. Or, you could add your device to the code the way the existing devices are configured. Look at GVRET.ino starting at line 113. You can see how it looks for the system type and configures the settings accordingly. You could add a new system type.

So, I'm not merging this yet though you're really close to having something that would work. Just work on it a little bit more and it should be ready to merge.

yoh-there commented 9 years ago

OK, so, I defined a new board, CANDUE13, added it's initialization, changing that to a switch as we go, and chnaged the set led to setsystype.