Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed BufferedSerial Servo PCT2075 FastPWM
Revision 9:ac2412df01be, committed 2018-11-10
- Comitter:
- JonFreeman
- Date:
- Sat Nov 10 17:08:21 2018 +0000
- Parent:
- 8:93203f473f6e
- Child:
- 10:e40d8724268a
- Commit message:
- About to work on hand control state machine to remove need of power cycle for direction change
Changed in this revision
--- a/F401RE.h Sat Aug 18 12:51:35 2018 +0000 +++ b/F401RE.h Sat Nov 10 17:08:21 2018 +0000 @@ -136,6 +136,9 @@ // If used as servo output, code gives pin to 'Servo' - seems to work InterruptIn Servo1_i (PB_8); // Pin 61 to read output from rc rx InterruptIn Servo2_i (PB_9); // Pin 62 to read output from rc rx +// *** NOTE *** Above InterruptIn Servo using PB pins seems not to work, probably due to other Port B pins used as PortOut (try PortInOut?) +// Nov 2018 - Yet to try using PC14, PC15, free now as 32k768 xtal not fitted + // Pin 63 VSS // Pin 64 VDD
--- a/cli_BLS_nortos.cpp Sat Aug 18 12:51:35 2018 +0000
+++ b/cli_BLS_nortos.cpp Sat Nov 10 17:08:21 2018 +0000
@@ -1,4 +1,4 @@
-// DualBLS2018_03
+// DualBLS2018_06
#include "mbed.h"
#include "BufferedSerial.h"
@@ -295,6 +295,11 @@
void (*f)(struct parameters &); // points to function
} ;
+
+/**
+struct kb_command const loco_command_list[] = {
+List of commands accepted from external controller through opto isolated com port 9600, 8,n,1
+*/
struct kb_command const loco_command_list[] = {
{"ls", "Lists available commands", menucmd},
{"?", "Lists available commands, same as ls", menucmd},
@@ -324,6 +329,10 @@
//const int numof_loco_menu_items = sizeof(loco_command_list) / sizeof(kb_command);
+/**
+struct kb_command const loco_command_list[] = {
+List of commands accepted from external pc through non-opto isolated com port 9600, 8,n,1
+*/
struct kb_command const pc_command_list[] = {
{"ls", "Lists available commands", menucmd},
{"?", "Lists available commands, same as ls", menucmd},
--- a/main.cpp Sat Aug 18 12:51:35 2018 +0000
+++ b/main.cpp Sat Nov 10 17:08:21 2018 +0000
@@ -32,7 +32,7 @@
*/
#if defined (TARGET_NUCLEO_F401RE) // CPU in 64 pin LQFP
-#include "F401RE.h"
+#include "F401RE.h" // See here for warnings about Servo InterruptIn not working
#endif
#if defined (TARGET_NUCLEO_F446ZE) // CPU in 144 pin LQFP
#include "F446ZE.h"
@@ -731,7 +731,7 @@
void hand_control_state_machine () {
static int new_hand_controller_state = HAND_CONT_STATE_BEGIN;
// static int old_hand_controller_state = HAND_CONT_STATE_BEGIN;
- static int old_hand_controller_direction = T5, t = 0;
+ static int old_hand_controller_direction = T5, t = 0; // Nov 2018 confirms Rob and Quentin obs, direction read at powerup
static double brake_effort, drive_effort, pot_position, old_pot_position = 0.0;
if (T5 != old_hand_controller_direction) { // 1 Forward, 0 Reverse
pc.printf ("Direction change! Power off then on again to resume\r\n");