Removed multithtreading (thanks windows)
This commit is contained in:
parent
e0135b6753
commit
d62fda675a
8 changed files with 23 additions and 24 deletions
|
|
@ -9,9 +9,9 @@
|
|||
#include "port.h"
|
||||
#include "portParameters.h"
|
||||
|
||||
Port::Port(std::shared_ptr<modbus_t*> modbus_context, std::mutex *modbus_context_mutex, uint16_t portStartAddress) {
|
||||
Port::Port(std::shared_ptr<modbus_t*> modbus_context, uint16_t portStartAddress) {
|
||||
this->modbus_context = modbus_context;
|
||||
this->modbus_context_mutex = modbus_context_mutex;
|
||||
// this->modbus_context_mutex = modbus_context_mutex;
|
||||
|
||||
this->portStartAddress = portStartAddress;
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ void Port::fixCurrent() {
|
|||
void Port::updateParameters() {
|
||||
std::vector<std::shared_ptr<PortParameter>>::iterator parametersIterator{this->parameters.begin()};
|
||||
while (parametersIterator != this->parameters.end()) {
|
||||
parametersIterator->get()->updateValue(this->modbus_context, this->modbus_context_mutex, this->portStartAddress);
|
||||
parametersIterator->get()->updateValue(this->modbus_context, this->portStartAddress);
|
||||
parametersIterator++;
|
||||
}
|
||||
this->fixCurrent();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue