View Single Post
Old 06-14-2015, 06:36 PM   #6 (permalink)
thingstodo
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 746
Thanked 565 Times in 447 Posts
Quote:
Originally Posted by Piotrsko View Post
Long time ago in a galaxy far far away, we had a command for terminal programs run on command prompt : Echo on. Default is "off"
I guess I'm old enough to have thought of that. But I didn't.

So I tried it, or I TRIED to try it.

I booted the controller with just 12V, no pack. There was no display of the cougar firmware version at 19200,n,8,1. Odd. So I checked the 12V battery - 12.8V seems OK. I cleaned the battery terminals - they are a bit corroded. Nope, that does not help. Pull out and reseat the serial cable connector on the board and to the computer. There is a bit of a squiggle, like I'd expect if I was at the wrong baud rate, on that one. But it's not reproducible so it may be just some noise. Most times there is nothing.

So I appear to be going backward. The controller LEDs are still the same - solid Green and solid Yellow. Increase the throttle (with the pack connected) and the Yellow blinks at about 25% throttle. Come to think of it, it does that with or without the pack.

It would be nice to use the terminal interface for troubleshooting .. but that has not worked well so far.

This code leads me to believe that there is no 'echo on'

Code:
if (cmdok) {
					// cmd is string, x is numeric value
					if (!strcmp_P(cmd, PSTR("save"))) {
						write_config();
						sprintf_P(str, PSTR("configuration written to EE\r\n"));
						uart_putstr(str);
					}
					else if (!strcmp_P(cmd, PSTR("idle"))) {
						sprintf_P(str, PSTR("AVR %lu%% idle\r\n"),
							wait_time(100) * (long)100 / idle_loopcount);
						uart_putstr(str);
					}
					else if (!strcmp_P(cmd, PSTR("kp"))) {
						if ((unsigned)x <= 500) {
							config.Kp = x; config_pi();
							show_config(str);
						}
					}
					else if (!strcmp_P(cmd, PSTR("ki"))) {
						if ((unsigned)x <= 500) {
							config.Ki = x; config_pi();
							show_config(str);
						}
					}
					else if (!strcmp_P(cmd, PSTR("t-min-rc"))) {
						if ((unsigned)x <= 1023) {
							cli(); config.throttle_min_raw_counts = x; sei();
							show_config(str);
						}
					}
					else if (!strcmp_P(cmd, PSTR("t-max-rc"))) {
						if ((unsigned)x <= 1023) {
							cli(); config.throttle_max_raw_counts = x; sei();
							show_config(str);
						}
					}
					else if (!strcmp_P(cmd, PSTR("t-pos-gain"))) {
						if ((unsigned)x <= 128) {
							cli(); config.throttle_pos_gain = x; sei();
							show_config(str);
						}
					}
					else if (!strcmp_P(cmd, PSTR("t-pwm-gain"))) {
						if ((unsigned)x <= 128) {
							cli(); config.throttle_pwm_gain = x; sei();
							show_config(str);
						}
					}
					else if (!strcmp_P(cmd, PSTR("c-rr"))) {
						if ((unsigned)x <= 100) {
							cli(); config.current_ramp_rate = x; sei();
							show_config(str);
						}
					}
				}
				else show_menu(str);
				// reset command string
				cmdpos = 0; cmd[0] = 0;
			}
Just 'save', 'idle', 'kp', 'ki', 't-min-rc', 't-max-rc', 't-pos-gain', 't-pwm-gain' and 'c-rr'.

As I read it, any command that is not found should show_config .. but it does not do that for me.
  Reply With Quote