Skip to content

Commit

Permalink
Externalize build version, fix tuning label updates
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcliffe committed Feb 23, 2015
1 parent adf160c commit a7a4ba9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
cmake_minimum_required (VERSION 2.8)

SET(CUBICSDR_VERSION_MAJOR "0")
SET(CUBICSDR_VERSION_MINOR "1")
SET(CUBICSDR_VERSION_PATCH "0")
SET(CUBICSDR_VERSION_REL "beta")
SET(CUBICSDR_VERSION "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}-${CUBICSDR_VERSION_REL}")

SET(CPACK_PACKAGE_VERSION ${CUBICSDR_VERSION})
SET(CPACK_PACKAGE_VERSION_MAJOR ${CUBICSDR_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${CUBICSDR_VERSION_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${CUBICSDR_VERSION_PATCH})

ADD_DEFINITIONS(
-DCUBICSDR_VERSION="${CUBICSDR_VERSION}"
)

IF (NOT APPLE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
ENDIF(NOT APPLE)
Expand Down
1 change: 0 additions & 1 deletion src/CubicSDRDefs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

#define CUBICSDR_VERSION "v0.01a"
#define CUBICSDR_TITLE "CubicSDR " CUBICSDR_VERSION " by Charles J. Cliffe (@ccliffe)"

#ifndef __BYTE_ORDER
Expand Down
4 changes: 3 additions & 1 deletion src/visual/TuningCanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ void TuningCanvas::OnIdle(wxIdleEvent &event) {
} else if (fabs(moveVal) >= 1.0) {
if (uxDown < -0.275) {
if (activeDemod != NULL) {
activeDemod->setFrequency(activeDemod->getFrequency() + (int) (moveVal * fabs(moveVal) * fabs(moveVal) * fabs(moveVal)));
long long freq = activeDemod->getFrequency() + (int) (moveVal * fabs(moveVal) * fabs(moveVal) * fabs(moveVal));
activeDemod->setFrequency(freq);
activeDemod->updateLabel(freq);
}
} else {
int amt = (int) (moveVal * fabs(moveVal) * fabs(moveVal) * fabs(moveVal));
Expand Down

0 comments on commit a7a4ba9

Please sign in to comment.