Skip to content

Commit

Permalink
fixed all clang-tidy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
PBrunot committed Feb 11, 2024
1 parent ec4c5bc commit 3e96fd1
Show file tree
Hide file tree
Showing 35 changed files with 179 additions and 183 deletions.
10 changes: 5 additions & 5 deletions include/AuthProvider.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef AUTHPROVIDER_H_
#define AUTHPROVIDER_H_
#ifndef AUTHPROVIDER_HPP_
#define AUTHPROVIDER_HPP_

#include "FabUser.hpp"
#include "secrets.hpp"
#include <list>
#include <string>
#include <string_view>
#include <tuple>
#include <string>
#include "secrets.hpp"

namespace fablabbg
{
Expand All @@ -29,4 +29,4 @@ namespace fablabbg
void setWhitelist(WhiteList list);
};
} // namespace fablabbg
#endif // AUTHPROVIDER_H_
#endif // AUTHPROVIDER_HPP_
8 changes: 4 additions & 4 deletions include/BaseLCDWrapper.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef BASELCDWRAPPER_H_
#define BASELCDWRAPPER_H_
#ifndef BASELCDWRAPPER_HPP_
#define BASELCDWRAPPER_HPP_

#include <string>
#include "BoardInfo.hpp"
#include "Machine.hpp"
#include <chrono>
#include <string>

using namespace std::chrono;

Expand All @@ -23,4 +23,4 @@ namespace fablabbg
};
} // namespace fablabbg

#endif // BASELCDWRAPPER_H_
#endif // BASELCDWRAPPER_HPP_
6 changes: 3 additions & 3 deletions include/BaseRfidWrapper.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef BASE_RFID_WRAPPER_HPP_
#define BASE_RFID_WRAPPER_HPP_
#ifndef BASERFIDWRAPPER_HPP_
#define BASERFIDWRAPPER_HPP_
#include <optional>

#include "card.hpp"
Expand All @@ -18,4 +18,4 @@ namespace fablabbg
virtual card::uid_t getUid() const = 0;
};
} // namespace fablabbg
#endif // BASE_RFID_WRAPPER_HPP_
#endif // BASERFIDWRAPPER_HPP_
21 changes: 10 additions & 11 deletions include/BoardLogic.hpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
#ifndef BOARDLOGIC_H
#define BOARDLOGIC_H
#ifndef BOARDLOGIC_HPP_
#define BOARDLOGIC_HPP_

#include "FabUser.hpp"
#include "card.hpp"
#include <Adafruit_NeoPixel.h>
#include "pins.hpp"
#include "FabBackend.hpp"
#include "BaseRfidWrapper.hpp"
#include "AuthProvider.hpp"
#include "Machine.hpp"
#include "secrets.hpp"
#include "BaseLCDWrapper.hpp"
#include "BaseRfidWrapper.hpp"
#include "FabBackend.hpp"
#include "FabUser.hpp"
#include "Led.hpp"
#include "Machine.hpp"
#include "card.hpp"
#include "pins.hpp"
#include "secrets.hpp"
#include <Adafruit_NeoPixel.h>

namespace fablabbg
{
Expand Down Expand Up @@ -104,4 +103,4 @@ namespace fablabbg
bool longTap(const card::uid_t card, const std::string &short_prompt) const;
};
} // namespace fablabbg
#endif // BOARDLOGIC_H
#endif // BOARDLOGIC_HPP_
10 changes: 5 additions & 5 deletions include/FabBackend.hpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#ifndef FABSERVER_H_
#define FABSERVER_H_
#ifndef FABBACKEND_HPP_
#define FABBACKEND_HPP_

#include <array>
#include <chrono>
#include <functional>
#include <string>

#include <ArduinoJson.h>
#include "WiFi.h"
#include <ArduinoJson.h>
#include <MQTTClient.h>

#include "FabUser.hpp"
#include "conf.hpp"
#include "MQTTtypes.hpp"
#include "SavedConfig.hpp"
#include "conf.hpp"

namespace fablabbg
{
Expand Down Expand Up @@ -81,4 +81,4 @@ namespace fablabbg
FabBackend &operator=(FabBackend &&) = delete; // move assignment
};
} // namespace fablabbg
#endif // FABSERVER_H_
#endif // FABBACKEND_HPP_
14 changes: 7 additions & 7 deletions include/FabUser.hpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef FABUSER_H_
#define FABUSER_H_
#ifndef FABUSER_HPP_
#define FABUSER_HPP_

#include <cstdint>
#include <string>
#include <array>
#include "Arduino.h"
#include "conf.hpp"
#include "card.hpp"
#include "conf.hpp"
#include <array>
#include <cstdint>
#include <sstream>
#include <string>

namespace fablabbg
{
Expand Down Expand Up @@ -56,4 +56,4 @@ namespace fablabbg
}
};
} // namespace fablabbg
#endif // FABUSER_H_
#endif // FABUSER_HPP_
10 changes: 5 additions & 5 deletions include/LCDWrapper.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef LCDWRAPPER_H_
#define LCDWRAPPER_H_
#ifndef LCDWRAPPER_HPP_
#define LCDWRAPPER_HPP_

#include <array>
#include "BaseLCDWrapper.hpp"
#include "BoardInfo.hpp"
#include "Machine.hpp"
#include "pins.hpp"
#include <array>
#include <chrono>
#include "BaseLCDWrapper.hpp"

using namespace std::chrono;

Expand Down Expand Up @@ -63,4 +63,4 @@ namespace fablabbg

#include "LCDWrapper.tpp"

#endif // LCDWRAPPER_H_
#endif // LCDWRAPPER_HPP_
8 changes: 4 additions & 4 deletions include/Led.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef FABLABBG_LED_HPP_
#define FABLABBG_LED_HPP_
#ifndef LED_HPP_
#define LED_HPP_

#include <Arduino.h>
#include <Adafruit_NeoPixel.h>
#include <Arduino.h>
#include <memory>

#include "pins.hpp"
Expand Down Expand Up @@ -37,4 +37,4 @@ namespace fablabbg

} // namespace fablabbg

#endif // FABLABBG_LED_HPP_
#endif // LED_HPP_
6 changes: 3 additions & 3 deletions include/Logging.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef FABLAB_LOGGING_HPP_
#define FABLAB_LOGGING_HPP_
#ifndef LOGGING_HPP_
#define LOGGING_HPP_

#include "esp_log.h"

[[maybe_unused]] static const char *TAG = "Rfid-Arduino"; // Required for ESP32 Logging

#endif // FABLAB_LOGGING_HPP_
#endif // LOGGING_HPP_
12 changes: 6 additions & 6 deletions include/MQTTtypes.hpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef MQTTTYPES_H_
#define MQTTTYPES_H_
#ifndef MQTTTYPES_HPP_
#define MQTTTYPES_HPP_

#include "ArduinoJson.h"
#include "FabUser.hpp"
#include "Machine.hpp"
#include "card.hpp"
#include "string"
#include <memory>
#include "FabUser.hpp"
#include "Machine.hpp"
#include <string_view>
#include "ArduinoJson.h"

namespace fablabbg::ServerMQTT
{
Expand Down Expand Up @@ -160,4 +160,4 @@ namespace fablabbg::ServerMQTT
};

} // namespace fablabbg::ServerMQTT
#endif
#endif // MQTTTYPES_HPP_
12 changes: 6 additions & 6 deletions include/Machine.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#ifndef MACHINE_H_
#define MACHINE_H_
#ifndef MACHINE_HPP_
#define MACHINE_HPP_

#include <cstdint>
#include <array>
#include <chrono>
#include "FabUser.hpp"
#include "MachineConfig.hpp"
#include <array>
#include <chrono>
#include <cstdint>

namespace fablabbg
{
Expand Down Expand Up @@ -105,4 +105,4 @@ namespace fablabbg
void power_relay(bool on_or_off);
};
} // namespace fablabbg
#endif // MACHINE_H_
#endif // MACHINE_HPP_
10 changes: 5 additions & 5 deletions include/MachineConfig.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef MACHINE_CONFIG_H_
#define MACHINE_CONFIG_H_
#ifndef MACHINECONFIG_HPP_
#define MACHINECONFIG_HPP_

#include "pins.hpp"
#include <chrono>
#include <cstdint>
#include <string>
#include <chrono>
#include "pins.hpp"

using namespace std::chrono;

Expand Down Expand Up @@ -66,4 +66,4 @@ namespace fablabbg
};
} // namespace fablabbg

#endif // MACHINE_CONFIG_H_
#endif // MACHINECONFIG_HPP_
16 changes: 8 additions & 8 deletions include/Mrfc522Driver.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef MRFC522_DRIVER_HPP_
#define MRFC522_DRIVER_HPP_
#ifndef MRFC522DRIVER_HPP_
#define MRFC522DRIVER_HPP_

#include <memory>
#include "Arduino.h"
#include <memory>

#include "MFRC522v2.h"
#include "MFRC522DriverSPI.h"
#include "MFRC522DriverPinSimple.h"
#include "MFRC522Debug.h"
#include "FabUser.hpp"
#include "MFRC522Debug.h"
#include "MFRC522DriverPinSimple.h"
#include "MFRC522DriverSPI.h"
#include "MFRC522v2.h"
#include "pins.hpp"

namespace fablabbg
Expand Down Expand Up @@ -43,4 +43,4 @@ namespace fablabbg
};
} // namespace fablabbg

#endif // MRFC522_DRIVER_HPP_
#endif // MRFC522DRIVER_HPP_
14 changes: 7 additions & 7 deletions include/RFIDWrapper.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef RFIDWRAPPER_H_
#define RFIDWRAPPER_H_
#ifndef RFIDWRAPPER_HPP_
#define RFIDWRAPPER_HPP_

#include <string>
#include <chrono>
#include <memory>
#include <optional>
#include <chrono>
#include <string>

#include "conf.hpp"
#include "card.hpp"
#include "BaseRfidWrapper.hpp"
#include "card.hpp"
#include "conf.hpp"

namespace fablabbg
{
Expand Down Expand Up @@ -57,4 +57,4 @@ namespace fablabbg

#include "RFIDWrapper.tpp"

#endif // RFIDWRAPPER_H_
#endif // RFIDWRAPPER_HPP_
10 changes: 5 additions & 5 deletions include/SavedConfig.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef SAVED_CONFIG_H_
#define SAVED_CONFIG_H_
#ifndef SAVEDCONFIG_HPP_
#define SAVEDCONFIG_HPP_

#include <string>
#include <cstdint>
#include <optional>
#include <string>

#include <EEPROM.h>

#include "conf.hpp"
#include "MachineConfig.hpp"
#include "conf.hpp"

namespace fablabbg
{
Expand Down Expand Up @@ -60,4 +60,4 @@ namespace fablabbg
};

} // namespace fablabbg
#endif // SAVED_CONFIG_H_
#endif // SAVEDCONFIG_HPP_
6 changes: 3 additions & 3 deletions include/Tasks.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef TASKS_H_
#define TASKS_H_
#ifndef TASKS_HPP_
#define TASKS_HPP_

#include <chrono>
#include <functional>
Expand Down Expand Up @@ -128,4 +128,4 @@ namespace fablabbg::Tasks
void task_delay(const milliseconds delay);

} // namespace fablabbg::Tasks
#endif
#endif // TASKS_HPP_
Loading

0 comments on commit 3e96fd1

Please sign in to comment.