update defaults to be in the right direction

master
James Gao 2014-11-29 22:24:59 -08:00
rodzic 141f699e9b
commit e873ee7601
2 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -40,7 +40,7 @@ const float step_interval = 1. / STEP_SPEED * 1000.; //milliseconds
//intermediate variables
Adafruit_MAX31855 thermo(PIN_TEMP_CS);
Stepper stepper(2048, PIN_STEP1, PIN_STEP3, PIN_STEP2, PIN_STEP4);
Stepper stepper(2048, PIN_STEP4, PIN_STEP2, PIN_STEP3, PIN_STEP1);
pushbutton reglimit = pushbutton(PIN_REGLIMIT, 5);
char i2c_command;
@ -82,6 +82,7 @@ unsigned long now;
void loop() {
now = millis();
reglimit.update();
status.aux_temp[0] = reglimit.n_clicks;
if (stepper_target != status.motor && now > next_step) {
dir = status.motor < stepper_target ? 1 : -1;

Wyświetl plik

@ -244,7 +244,7 @@ class Regulator(threading.Thread):
pass
class Breakout(object):
def __init__(self, addr, maxsteps=4500, minsteps=2500):
def __init__(self, addr, maxsteps=6000, minsteps=3700):
import breakout
self.device = breakout.Breakout(addr)
self.min = minsteps
@ -255,7 +255,7 @@ class Breakout(object):
self.off()
atexit.register(exit)
def ignite(self, start=2800, delay=10):
def ignite(self, start=3850, delay=10):
logger.info("Igniting system")
self.device.ignite = 255
time.sleep(delay)
@ -280,4 +280,5 @@ class Breakout(object):
def off(self):
self.device.motor = 0
self.device.ignite = 0
logger.info("Shutting off regulator")