more code cleanup

This commit is contained in:
Ruixiang Du
2020-06-17 11:38:29 +08:00
parent 44b89ee5f9
commit 2b9f7cc616
45 changed files with 580 additions and 129 deletions

View File

@@ -9,7 +9,7 @@
#include "hunter_base/hunter_base.hpp"
using namespace wescore;
using namespace westonrobot;
int main(int argc, char **argv)
{

View File

@@ -9,7 +9,7 @@
#include "scout_base/scout_base.hpp"
using namespace wescore;
using namespace westonrobot;
int main(int argc, char **argv)
{

View File

@@ -9,7 +9,7 @@
#include "scout_base/scout_base.hpp"
using namespace wescore;
using namespace westonrobot;
int main(int argc, char **argv)
{

View File

@@ -7,7 +7,7 @@
#include "monitor/scout_monitor.hpp"
using namespace wescore;
using namespace westonrobot;
int main(int argc, char **argv)
{

View File

@@ -17,7 +17,7 @@
#include <ncurses.h>
namespace wescore
namespace westonrobot
{
struct NColors
{
@@ -62,6 +62,6 @@ struct NColors
static void WSetColor(WINDOW *win, int fg, int bg = BLACK);
static void WUnsetColor(WINDOW *win, int fg, int bg = BLACK);
};
} // namespace wescore
} // namespace westonrobot
#endif /* NCOLORS_HPP */

View File

@@ -12,13 +12,13 @@
#include <ncurses.h>
namespace wescore
namespace westonrobot
{
struct NShapes
{
static void DrawRectangle(int tl_y, int tl_x, int br_y, int br_x);
static void WDrawRectangle(WINDOW *win, int tl_y, int tl_x, int br_y, int br_x);
};
} // namespace wescore
} // namespace westonrobot
#endif /* NSHAPES_HPP */

View File

@@ -14,7 +14,7 @@
#include <ncurses.h>
namespace wescore
namespace westonrobot
{
class ScoutMonitor
{
@@ -73,6 +73,6 @@ private:
void UpdateScoutSystemInfo();
void UpdateScoutCmdWindow();
};
} // namespace wescore
} // namespace westonrobot
#endif /* SCOUT_MONITOR_HPP */

View File

@@ -58,7 +58,7 @@ short CursorColor(int fg)
}
} // namespace
namespace wescore
namespace westonrobot
{
void NColors::InitColors()
{
@@ -111,4 +111,4 @@ void NColors::WUnsetColor(WINDOW *win, int fg, int bg)
if (IsBold(fg))
wattroff(win, A_BOLD);
}
} // namespace wescore
} // namespace westonrobot

View File

@@ -9,7 +9,7 @@
#include "monitor/nshapes.hpp"
namespace wescore
namespace westonrobot
{
void NShapes::DrawRectangle(int tl_y, int tl_x, int br_y, int br_x)
{
@@ -38,4 +38,4 @@ void NShapes::WDrawRectangle(WINDOW *win, int tl_y, int tl_x, int br_y, int br_x
mvwprintw(win, br_y, i, "-");
}
}
} // namespace wescore
} // namespace westonrobot

View File

@@ -111,7 +111,7 @@ struct StopWatch
};
} // namespace
namespace wescore
namespace westonrobot
{
ScoutMonitor::ScoutMonitor()
{
@@ -655,4 +655,4 @@ void ScoutMonitor::ShowMotorInfo(int y, int x, double cur, int rpm, int temp, bo
std::string temp_str = "TMP:" + ConvertFloatToString(temp, 0);
mvwprintw(body_info_win_, y + 3, col_title, temp_str.c_str());
}
} // namespace wescore
} // namespace westonrobot

View File

@@ -1,6 +1,6 @@
#include "monitor/ncolors.hpp"
using namespace wescore;
using namespace westonrobot;
int main(void)
{

View File

@@ -7,7 +7,7 @@
#include "monitor/scout_monitor.hpp"
using namespace wescore;
using namespace westonrobot;
ScoutMonitor monitor;

View File

@@ -7,7 +7,7 @@
#include "monitor/scout_monitor.hpp"
using namespace wescore;
using namespace westonrobot;
ScoutMonitor monitor;

View File

@@ -9,7 +9,7 @@
#include "tracer_base/tracer_base.hpp"
using namespace wescore;
using namespace westonrobot;
int main(int argc, char **argv)
{