mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
Cleanup logging
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
// Created by Johnathon Slightham on 2025-07-26.
|
||||
//
|
||||
|
||||
#include <constants/module.h>
|
||||
#include "constants/module.h"
|
||||
#include "OrientationDetection.h"
|
||||
#include "ConfigManager.h"
|
||||
#include "iostream"
|
||||
|
||||
#include <ConfigManager.h>
|
||||
#include <iostream>
|
||||
#include <bits/ostream.tcc>
|
||||
#define TAG "OrientationDetection"
|
||||
|
||||
void OrientationDetection::init() {
|
||||
const auto& config_manager = ConfigManager::get_instance();
|
||||
@@ -21,16 +21,16 @@ void OrientationDetection::init() {
|
||||
|
||||
Orientation OrientationDetection::get_orientation(const uint8_t channel) {
|
||||
if (gpio_get_level(static_cast<gpio_num_t>(CHANNEL_TO_90_DEG_MAP[channel]))) {
|
||||
std::cout << "90deg" << std::endl;
|
||||
ESP_LOGD(TAG, "90deg");
|
||||
return Orientation_Deg90;
|
||||
} else if (gpio_get_level(static_cast<gpio_num_t>(CHANNEL_TO_180_DEG_MAP[channel]))) {
|
||||
std::cout << "180deg" << std::endl;
|
||||
ESP_LOGD(TAG, "180deg");
|
||||
return Orientation_Deg180;
|
||||
} else if (gpio_get_level(static_cast<gpio_num_t>(CHANNEL_TO_270_DEG_MAP[channel]))) {
|
||||
std::cout << "270deg" << std::endl;
|
||||
ESP_LOGD(TAG, "270deg");
|
||||
return Orientation_Deg270;
|
||||
} else {
|
||||
std::cout << "No orientation detected" << std::endl;
|
||||
ESP_LOGD(TAG, "No orientation detected");
|
||||
return Orientation_Deg0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user