Skip to content

Commit

Permalink
Added support for Mechaduino
Browse files Browse the repository at this point in the history
Added simple and positional PID modes
Changed PID parameters to be floating point in flash
Started working on relay tuning, but is not complete
  • Loading branch information
trampas committed Dec 6, 2016
1 parent 75d73e5 commit 26f7745
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions firmware/stepper_nano_zero/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

//mechaduio and Arduino Zero has defined serial ports differently than NZS
#ifdef MECHADUINO_HARDWARE
#warning "Compiling source for Mechaduino NOT NZS"
#define Serial5 Serial
#else
#define SerialUSB Serial
Expand Down
8 changes: 4 additions & 4 deletions firmware/stepper_nano_zero/calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ bool CalibrationTable::updateTableValue(int32_t index, int32_t value)
void CalibrationTable::printCalTable(void)
{
int i;
SerialUSB.print("\n\r");
Serial.print("\n\r");
for (i=0; i<CALIBRATION_TABLE_SIZE; i++)
{
SerialUSB.print((uint16_t)table[i].value);
SerialUSB.print(",");
Serial.print((uint16_t)table[i].value);
Serial.print(",");
}
SerialUSB.print("\n\r");
Serial.print("\n\r");
}

Angle CalibrationTable::fastReverseLookup(Angle encoderAngle)
Expand Down
3 changes: 1 addition & 2 deletions firmware/stepper_nano_zero/syslog.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#ifndef SYSLOG_H_
#define SYSLOG_H_

#include "board.h"
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
Expand All @@ -28,7 +27,7 @@ extern "C"

#define SYSLOG_WRITE(buffer,nBytes)

#define SYSLOG_PUTC(x) SerialUSB.write(x)
#define SYSLOG_PUTC(x) Serial.write(x)

#define Sys_WDogHoldOn()
#define Sys_WDogHoldOff()
Expand Down

0 comments on commit 26f7745

Please sign in to comment.