
This is a remote control tester, it uses a CNC, Ethernet Communication with a JAVAFX interface and a PLC in order to control some valves.
Dependencies: EthernetInterface mbed-rtos mbed
Fork of CNC_CONTROLLER by
Diff: Stepp.cpp
- Revision:
- 2:835c883d81b0
- Parent:
- 1:ef18c260ce02
--- a/Stepp.cpp Mon Sep 18 13:05:47 2017 +0000 +++ b/Stepp.cpp Fri Dec 15 19:40:41 2017 +0000 @@ -36,7 +36,7 @@ return 1; } -bool Stepp::findLimits(int n_steps, bool direction, DigitalIn sensor) { +bool Stepp::findLimits(int n_steps, bool direction, PCF8574* sensor,int port) { int accelspeed = 0; if(this->acell) accelspeed = START_STOP_SPEED; @@ -46,7 +46,7 @@ _en = 0; // habilita move _dir = direction; - while(sensor.read() == 0 && EixoMonitoring::stopAll == false){ // n chegou na origem + while(sensor->read(port) == 0 && EixoMonitoring::stopAll == false){ // n chegou na origem if(this->acell){ //linear acceleration if(i < START_STOP_SPEED) if (--accelspeed == this->speed) accelspeed ++; @@ -64,7 +64,7 @@ _en = 1; - if(sensor.read() == 0){ + if(sensor->read(port) == 0){ return 0; } else{