From 43a11ba04801dc34f7ea65aaec64b087ab1f8330 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sun, 21 Aug 2016 17:49:06 -0700 Subject: [PATCH] Rename time files/namespace to not conflict with existing defs. --- firmware/application/CMakeLists.txt | 2 +- firmware/application/event_m0.cpp | 4 ++-- firmware/application/{time.cpp => rtc_time.cpp} | 6 +++--- firmware/application/{time.hpp => rtc_time.hpp} | 10 +++++----- firmware/application/ui_record_view.cpp | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) rename firmware/application/{time.cpp => rtc_time.cpp} (92%) rename firmware/application/{time.hpp => rtc_time.hpp} (88%) diff --git a/firmware/application/CMakeLists.txt b/firmware/application/CMakeLists.txt index 50dc53bb..23d61736 100644 --- a/firmware/application/CMakeLists.txt +++ b/firmware/application/CMakeLists.txt @@ -170,7 +170,7 @@ set(CPPSRC ${COMMON}/ert_packet.cpp capture_app.cpp sd_card.cpp - time.cpp + rtc_time.cpp file.cpp log_file.cpp ${COMMON}/png_writer.cpp diff --git a/firmware/application/event_m0.cpp b/firmware/application/event_m0.cpp index d40d60a9..a7fae4a3 100644 --- a/firmware/application/event_m0.cpp +++ b/firmware/application/event_m0.cpp @@ -24,7 +24,7 @@ #include "portapack.hpp" #include "sd_card.hpp" -#include "time.hpp" +#include "rtc_time.hpp" #include "message.hpp" #include "message_queue.hpp" @@ -219,7 +219,7 @@ void EventDispatcher::handle_rtc_tick() { portapack::temperature_logger.second_tick(); - time::on_tick_second(); + rtc_time::on_tick_second(); } ui::Widget* EventDispatcher::touch_widget(ui::Widget* const w, ui::TouchEvent event) { diff --git a/firmware/application/time.cpp b/firmware/application/rtc_time.cpp similarity index 92% rename from firmware/application/time.cpp rename to firmware/application/rtc_time.cpp index 10ba7f3b..d4a9f506 100644 --- a/firmware/application/time.cpp +++ b/firmware/application/rtc_time.cpp @@ -19,9 +19,9 @@ * Boston, MA 02110-1301, USA. */ -#include "time.hpp" +#include "rtc_time.hpp" -namespace time { +namespace rtc_time { Signal<> signal_tick_second; @@ -29,4 +29,4 @@ void on_tick_second() { signal_tick_second.emit(); } -} /* namespace time */ +} /* namespace rtc_time */ diff --git a/firmware/application/time.hpp b/firmware/application/rtc_time.hpp similarity index 88% rename from firmware/application/time.hpp rename to firmware/application/rtc_time.hpp index 470c894d..e43793be 100644 --- a/firmware/application/time.hpp +++ b/firmware/application/rtc_time.hpp @@ -19,17 +19,17 @@ * Boston, MA 02110-1301, USA. */ -#ifndef __TIME_H__ -#define __TIME_H__ +#ifndef __RTC_TIME_H__ +#define __RTC_TIME_H__ #include "signal.hpp" -namespace time { +namespace rtc_time { extern Signal<> signal_tick_second; void on_tick_second(); -} /* namespace time */ +} /* namespace rtc_time */ -#endif/*__TIME_H__*/ +#endif/*__RTC_TIME_H__*/ diff --git a/firmware/application/ui_record_view.cpp b/firmware/application/ui_record_view.cpp index 695a454d..bf7ec391 100644 --- a/firmware/application/ui_record_view.cpp +++ b/firmware/application/ui_record_view.cpp @@ -25,7 +25,7 @@ using namespace portapack; #include "file.hpp" -#include "time.hpp" +#include "rtc_time.hpp" #include "string_format.hpp" #include "utility.hpp" @@ -188,13 +188,13 @@ RecordView::RecordView( this->toggle(); }; - signal_token_tick_second = time::signal_tick_second += [this]() { + signal_token_tick_second = rtc_time::signal_tick_second += [this]() { this->on_tick_second(); }; } RecordView::~RecordView() { - time::signal_tick_second -= signal_token_tick_second; + rtc_time::signal_tick_second -= signal_token_tick_second; } void RecordView::focus() {