Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in storing encoder steps #383

Merged
merged 1 commit into from
Feb 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions cnc_ctrl_v1/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ Copyright 2014-2017 Bar Smith*/

#include "Maslow.h"

void settingsInit(){
// Do we have any error handling of this?
settingsLoadFromEEprom();
settingsLoadStepsFromEEprom();
}

void settingsLoadFromEEprom(){
/*
Loads data from EEPROM if EEPROM data is valid, only called on startup
Expand Down
1 change: 0 additions & 1 deletion cnc_ctrl_v1/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ typedef struct {
byte eepromValidData;
} settingsStepsV1_t;

void settingsInit();
void settingsLoadFromEEprom();
void settingsReset();
void settingsWipe(byte);
Expand Down
3 changes: 2 additions & 1 deletion cnc_ctrl_v1/cnc_ctrl_v1.ino
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ void setup(){
Serial.print(getPCBVersion());
Serial.println(F(" Detected"));
sys.inchesToMMConversion = 1;
settingsInit();
settingsLoadFromEEprom();
setupAxes();
settingsLoadStepsFromEEprom();
// TODO This seems wrong, if the encoder steps are changed, axis position
// will be in the wrong place. Would be better if we stored positions as
// steps
Expand Down