Skip to content

Commit

Permalink
Use uint
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Oct 8, 2022
1 parent 33af3c0 commit 47442ec
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/IO/ArduinoProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ DCMotorState ArduinoProxy::getDCMotorState(int forwardPin, int reversePin)
}
}

int ArduinoProxy::getLoadCellState()
uint32_t ArduinoProxy::getLoadCellState()
{
std::lock_guard<std::mutex> lockGuard(stateMutex);

Expand Down
4 changes: 2 additions & 2 deletions src/IO/ArduinoProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ArduinoProxy : IO
bool getDigitalState(int pin);
int getServoState(int pin);
DCMotorState getDCMotorState(int forwardPin, int reversePin);
int getLoadCellState();
uint32_t getLoadCellState();

ArduinoProxy(ArduinoProxy const &) = delete;
void operator=(ArduinoProxy const &) = delete;
Expand All @@ -34,7 +34,7 @@ class ArduinoProxy : IO
std::map<unsigned int, std::pair<bool, std::chrono::time_point<std::chrono::steady_clock>>> digitalStates;
std::map<unsigned int, std::pair<int, std::chrono::time_point<std::chrono::steady_clock>>> servoStates;
std::map<std::pair<unsigned int, unsigned int>, DCMotorState> dcMotorStates;
std::pair<int, std::chrono::time_point<std::chrono::steady_clock>> loadCellState;
std::pair<uint32_t, std::chrono::time_point<std::chrono::steady_clock>> loadCellState;
std::mutex stateMutex;

int fd = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/IO/gpio/LoadCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LoadCell::LoadCell()
#endif
}

int LoadCell::getCurrentState()
uint32_t LoadCell::getCurrentState()
{
#if USE_ARDUINO_PROXY == 1
try
Expand Down
2 changes: 1 addition & 1 deletion src/IO/gpio/LoadCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class LoadCell : public IO
public:
LoadCell();

int getCurrentState();
uint32_t getCurrentState();
void run() override;
bool isInitialized() override;

Expand Down
2 changes: 1 addition & 1 deletion src/data/GpioData.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ struct GpioState
std::map<std::string, int> digitalStateMap;
std::map<std::string, int> pwmStateMap;
std::map<std::string, DCMotorState> dcMotorStateMap;
int loadCellState;
uint32_t loadCellState;
};

0 comments on commit 47442ec

Please sign in to comment.