Skip to content

Commit

Permalink
New fullscreen command line option and general code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
colinbourassa committed Aug 24, 2018
1 parent f2f1e59 commit 3089773
Show file tree
Hide file tree
Showing 11 changed files with 221 additions and 163 deletions.
87 changes: 44 additions & 43 deletions CMakeLists.txt
Expand Up @@ -2,8 +2,8 @@ cmake_minimum_required (VERSION 2.8.11)
project (rovergauge)

set (ROVERGAUGE_VER_MAJOR 0)
set (ROVERGAUGE_VER_MINOR 9)
set (ROVERGAUGE_VER_PATCH 4)
set (ROVERGAUGE_VER_MINOR 10)
set (ROVERGAUGE_VER_PATCH 0)

set (CMAKE_INCLUDE_CURRENT_DIR ON)
set (CMAKE_AUTOMOC ON)
Expand Down Expand Up @@ -60,45 +60,46 @@ add_definitions ("-DROVERGAUGE_VER_MAJOR=${ROVERGAUGE_VER_MAJOR}"
"-DROVERGAUGE_VER_MINOR=${ROVERGAUGE_VER_MINOR}"
"-DROVERGAUGE_VER_PATCH=${ROVERGAUGE_VER_PATCH}")

add_executable (rovergauge main.cpp
cuxinterface.cpp
cuxinterface.h
simulationmodedialog.cpp
simulationmodedialog.h
helpviewer.cpp
helpviewer.h
idleaircontroldialog.cpp
idleaircontroldialog.h
logger.cpp
logger.h
serialdevenumerator.cpp
serialdevenumerator.h
fueltrimbar.cpp
fueltrimbar.h
mainwindow.cpp
mainwindow.h
faultcodedialog.cpp
faultcodedialog.h
aboutbox.cpp
aboutbox.h
optionsdialog.cpp
optionsdialog.h
batterybackeddisplay.cpp
batterybackeddisplay.h
qledindicator/qledindicator.cpp
qledindicator/qledindicator.h
analogwidgets/led.cpp
analogwidgets/led.h
analogwidgets/functions.cpp
analogwidgets/functions.h
analogwidgets/widgetwithbackground.cpp
analogwidgets/widgetwithbackground.h
analogwidgets/manometer.cpp
analogwidgets/manometer.h
analogwidgets/abstractmeter.cpp
analogwidgets/abstractmeter.h
${UI_SOURCE}
${RG_RESOURCE})
add_executable (rovergauge
main.cpp
cuxinterface.cpp
cuxinterface.h
simulationmodedialog.cpp
simulationmodedialog.h
helpviewer.cpp
helpviewer.h
idleaircontroldialog.cpp
idleaircontroldialog.h
logger.cpp
logger.h
serialdevenumerator.cpp
serialdevenumerator.h
fueltrimbar.cpp
fueltrimbar.h
mainwindow.cpp
mainwindow.h
faultcodedialog.cpp
faultcodedialog.h
aboutbox.cpp
aboutbox.h
optionsdialog.cpp
optionsdialog.h
batterybackeddisplay.cpp
batterybackeddisplay.h
qledindicator/qledindicator.cpp
qledindicator/qledindicator.h
analogwidgets/led.cpp
analogwidgets/led.h
analogwidgets/functions.cpp
analogwidgets/functions.h
analogwidgets/widgetwithbackground.cpp
analogwidgets/widgetwithbackground.h
analogwidgets/manometer.cpp
analogwidgets/manometer.h
analogwidgets/abstractmeter.cpp
analogwidgets/abstractmeter.h
${UI_SOURCE}
${RG_RESOURCE})

if (MINGW)
message (STATUS "Found Windows/MinGW platform.")
Expand Down Expand Up @@ -180,11 +181,11 @@ if (MINGW)
install (FILES "${CMAKE_BINARY_DIR}/rovergauge.exe"
${LIBGCC}
${LIBSTDCPP}
${QT5CORE_LIB}
${QT5CORE_LIB}
${QT5WIDGETS_LIB}
${QT5GUI_LIB}
${COMM14CUX_DLL}
${ZLIB_LIBRARIES}
${ZLIB_LIBRARIES}
DESTINATION ".")
install (FILES "${CMAKE_BINARY_DIR}/README.TXT" "${CMAKE_BINARY_DIR}/LICENSE.TXT" DESTINATION "doc")
install (FILES ${QT5WINDOWS_LIB} DESTINATION "platforms")
Expand Down
4 changes: 2 additions & 2 deletions commonunits.h
Expand Up @@ -11,8 +11,8 @@ enum SpeedUnits

enum TemperatureUnits
{
Fahrenheit = 0,
Celsius = 1
Fahrenheit,
Celsius
};

enum SampleType
Expand Down
12 changes: 6 additions & 6 deletions cuxinterface.cpp
Expand Up @@ -457,7 +457,7 @@ void CUXInterface::runServiceLoop()
/**
* Determines if the sample type should be read given the current operating mode
*/
bool CUXInterface::isSampleAppropriateForMode(SampleType type)
bool CUXInterface::isSampleAppropriateForMode(SampleType type) const
{
bool status = true;

Expand Down Expand Up @@ -726,9 +726,9 @@ void CUXInterface::cancelRead()
* @return Pointer to the container holding the fuel map data, or 0 if the
* fuel map in question has not yet been retrieved
*/
QByteArray* CUXInterface::getFuelMap(unsigned int fuelMapId)
const QByteArray* CUXInterface::getFuelMap(unsigned int fuelMapId) const
{
QByteArray* map = 0;
const QByteArray* map = 0;

if (m_fuelMapDataIsCurrent[fuelMapId])
{
Expand Down Expand Up @@ -756,7 +756,7 @@ void CUXInterface::invalidateFuelMapData()
* Returns the last-read fuel map adjustment factor.
* @return Last-read fuel map adjustment factor
*/
int CUXInterface::getFuelMapAdjustmentFactor(unsigned int fuelMapId)
int CUXInterface::getFuelMapAdjustmentFactor(unsigned int fuelMapId) const
{
int adjFactor = -1;

Expand All @@ -773,7 +773,7 @@ int CUXInterface::getFuelMapAdjustmentFactor(unsigned int fuelMapId)
* @param speedMph Speed in miles per hour
* @return Speed in the desired units
*/
unsigned int CUXInterface::convertSpeed(unsigned int speedMph)
unsigned int CUXInterface::convertSpeed(unsigned int speedMph) const
{
float speed = (float)speedMph;

Expand All @@ -790,7 +790,7 @@ unsigned int CUXInterface::convertSpeed(unsigned int speedMph)
* @param tempF Temperature in Fahrenheit degrees
* @return Temperature in the desired units
*/
int CUXInterface::convertTemperature(int tempF)
int CUXInterface::convertTemperature(int tempF) const
{
double temp = tempF;

Expand Down

0 comments on commit 3089773

Please sign in to comment.