Touch screen drivers control dashboard for miniature locomotive. Features meters for speed, volts, power. Switches for lights, horns. Drives multiple STM3_ESC brushless motor controllers for complete brushless loco system as used in "The Brute" - www.jons-workshop.com
Dependencies: TS_DISCO_F746NG mbed Servo LCD_DISCO_F746NG BSP_DISCO_F746NG QSPI_DISCO_F746NG AsyncSerial FastPWM
Diff: Electric_Loco.h
- Revision:
- 9:644867052318
- Parent:
- 5:21a8ac83142c
- Child:
- 10:0bdfd342f393
- Child:
- 11:a573664b1a59
--- a/Electric_Loco.h Wed May 09 17:09:18 2018 +0000 +++ b/Electric_Loco.h Fri Jun 01 07:05:58 2018 +0000 @@ -1,5 +1,5 @@ #include "mbed.h" -/* Updated 12 Nov 2017 +/* Updated 9 May 2018 Jon Freeman 5" and 7.25" gauge Electric Locomotive Controller - ST DISCO-F746NG @@ -36,8 +36,6 @@ const int - NUMBER_OF_MOTORS = 4, // 1 to 6 motors - BUTTON_RAD = (SLIDERW / 2) - 4, // radius of circular 'knob' in slider control MIN_POS = BUTTON_RAD + 5, // top of screen MAX_POS = SLIDERH - (BUTTON_RAD + 1), // bottom of screen @@ -78,7 +76,6 @@ struct slide { int position; int oldpos; int state; int direction; bool recalc_run; bool handbrake_slipping; double handbrake_effort; double loco_speed; } ; struct point { int x; int y; } ; -//struct rect { struct point a, b; } ; struct key { int keynum; int x; int y; bool pressed; } ; struct ky_bd { int count, slider_y; key ky[MAX_TOUCHES + 1]; bool sli; } ;