bla
This commit is contained in:
@@ -48,9 +48,9 @@ void DriverBoardPinController::deactivate(items::DriverBoardItem &driver_board_i
|
||||
void DriverBoardPinController::select_adress(uint8_t address)
|
||||
{
|
||||
address = address / 8;
|
||||
this->write_pin(this->address_pins[0], address & 0b001);
|
||||
this->write_pin(this->address_pins[1], address & 0b010);
|
||||
this->write_pin(this->address_pins[2], address & 0b100);
|
||||
write_pin(this->address_pins[0], address & 0b001);
|
||||
write_pin(this->address_pins[1], address & 0b010);
|
||||
write_pin(this->address_pins[2], address & 0b100);
|
||||
}
|
||||
|
||||
void DriverBoardPinController::set_address_pins(std::array<uint8_t, 3> address_pins)
|
||||
@@ -73,14 +73,14 @@ void DriverBoardPinController::set_run_pin(uint8_t run_pin)
|
||||
void DriverBoardPinController::select_mux(uint8_t mux)
|
||||
{
|
||||
this->deselect_all_muxes();
|
||||
this->write_pin(this->mux_enable_pins[mux], 1);
|
||||
write_pin(this->mux_enable_pins[mux], 1);
|
||||
}
|
||||
|
||||
void DriverBoardPinController::deselect_all_muxes()
|
||||
{
|
||||
for(auto pin : mux_enable_pins)
|
||||
{
|
||||
this->write_pin(pin, 0);
|
||||
write_pin(pin, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ private:
|
||||
void deselect_all_muxes();
|
||||
void select_mux(uint8_t mux);
|
||||
void select_adress(uint8_t address);
|
||||
void write_pin(uint8_t pin, bool value) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<std::mutex> output_item_mutex;
|
||||
|
||||
Reference in New Issue
Block a user