auto-sync
This commit is contained in:
parent
3e82fc841e
commit
a6ea11e797
|
@ -69,6 +69,7 @@
|
||||||
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
||||||
|
<listOptionValue builtIn="false" value=""../console_util""/>
|
||||||
<listOptionValue builtIn="false" value=""../development""/>
|
<listOptionValue builtIn="false" value=""../development""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/test""/>
|
<listOptionValue builtIn="false" value=""../development/test""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
||||||
|
@ -122,6 +123,7 @@
|
||||||
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
||||||
|
<listOptionValue builtIn="false" value=""../console_util""/>
|
||||||
<listOptionValue builtIn="false" value=""../development""/>
|
<listOptionValue builtIn="false" value=""../development""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/test""/>
|
<listOptionValue builtIn="false" value=""../development/test""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
||||||
|
@ -345,6 +347,7 @@
|
||||||
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
||||||
|
<listOptionValue builtIn="false" value=""../console_util""/>
|
||||||
<listOptionValue builtIn="false" value=""../development""/>
|
<listOptionValue builtIn="false" value=""../development""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/test""/>
|
<listOptionValue builtIn="false" value=""../development/test""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
||||||
|
@ -393,6 +396,7 @@
|
||||||
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
||||||
|
<listOptionValue builtIn="false" value=""../console_util""/>
|
||||||
<listOptionValue builtIn="false" value=""../development""/>
|
<listOptionValue builtIn="false" value=""../development""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/test""/>
|
<listOptionValue builtIn="false" value=""../development/test""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
||||||
|
@ -515,6 +519,7 @@
|
||||||
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
||||||
|
<listOptionValue builtIn="false" value=""../console_util""/>
|
||||||
<listOptionValue builtIn="false" value=""../development""/>
|
<listOptionValue builtIn="false" value=""../development""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/test""/>
|
<listOptionValue builtIn="false" value=""../development/test""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
||||||
|
@ -632,6 +637,7 @@
|
||||||
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
||||||
|
<listOptionValue builtIn="false" value=""../console_util""/>
|
||||||
<listOptionValue builtIn="false" value=""../development""/>
|
<listOptionValue builtIn="false" value=""../development""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/test""/>
|
<listOptionValue builtIn="false" value=""../development/test""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
||||||
|
@ -685,6 +691,7 @@
|
||||||
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
<listOptionValue builtIn="false" value=""../controllers/sensors""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
<listOptionValue builtIn="false" value=""../controllers/system""/>
|
||||||
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
<listOptionValue builtIn="false" value=""../controllers/math""/>
|
||||||
|
<listOptionValue builtIn="false" value=""../console_util""/>
|
||||||
<listOptionValue builtIn="false" value=""../development""/>
|
<listOptionValue builtIn="false" value=""../development""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/test""/>
|
<listOptionValue builtIn="false" value=""../development/test""/>
|
||||||
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
<listOptionValue builtIn="false" value=""../development/hw_layer""/>
|
||||||
|
|
|
@ -112,6 +112,7 @@ include $(PROJECT_DIR)/controllers/sensors/sensors.mk
|
||||||
include $(PROJECT_DIR)/controllers/system/system.mk
|
include $(PROJECT_DIR)/controllers/system/system.mk
|
||||||
include $(PROJECT_DIR)/controllers/trigger/trigger.mk
|
include $(PROJECT_DIR)/controllers/trigger/trigger.mk
|
||||||
include $(PROJECT_DIR)/console/console.mk
|
include $(PROJECT_DIR)/console/console.mk
|
||||||
|
include $(PROJECT_DIR)/console_util/console_util.mk
|
||||||
|
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
|
@ -128,6 +129,7 @@ CSRC = $(PORTSRC) \
|
||||||
$(UTILSRC) \
|
$(UTILSRC) \
|
||||||
$(ENGINES_SRC) \
|
$(ENGINES_SRC) \
|
||||||
$(CONSOLESRC) \
|
$(CONSOLESRC) \
|
||||||
|
$(CONSOLEUTILSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(DEV_SRC) \
|
$(DEV_SRC) \
|
||||||
$(HW_LAYER_EMS) \
|
$(HW_LAYER_EMS) \
|
||||||
|
@ -196,6 +198,7 @@ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
|
||||||
ext \
|
ext \
|
||||||
ext_algo \
|
ext_algo \
|
||||||
util \
|
util \
|
||||||
|
console_util \
|
||||||
console \
|
console \
|
||||||
console/binary \
|
console/binary \
|
||||||
hw_layer \
|
hw_layer \
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
CONSOLEUTILSRC = $(PROJECT_DIR)/console_util/rfiutil.c
|
|
@ -0,0 +1,73 @@
|
||||||
|
/**
|
||||||
|
* @file rfiutil.c
|
||||||
|
* @brief Number to string conversion code
|
||||||
|
*
|
||||||
|
* @date Nov 15, 2012
|
||||||
|
* @author Andrey Belomutskiy, (c) 2012-2016
|
||||||
|
*
|
||||||
|
* This file is part of rusEfi - see http://rusefi.com
|
||||||
|
*
|
||||||
|
* rusEfi is free software; you can redistribute it and/or modify it under the terms of
|
||||||
|
* the GNU General Public License as published by the Free Software Foundation; either
|
||||||
|
* version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
|
||||||
|
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with this program.
|
||||||
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include "main.h"
|
||||||
|
#include "rfiutil.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
not used, not sure if we still need it. I guess we will remove it in 2015
|
||||||
|
int mylog10(int param) {
|
||||||
|
if (param < 10)
|
||||||
|
return 0;
|
||||||
|
if (param < 100)
|
||||||
|
return 1;
|
||||||
|
if (param < 1000)
|
||||||
|
return 2;
|
||||||
|
if (param < 10000)
|
||||||
|
return 3;
|
||||||
|
if (param < 100000)
|
||||||
|
return 4;
|
||||||
|
if (param < 1000000)
|
||||||
|
return 5;
|
||||||
|
if (param < 10000000)
|
||||||
|
return 6;
|
||||||
|
if (param < 100000000)
|
||||||
|
return 7;
|
||||||
|
#warning This would be better without recursion
|
||||||
|
return mylog10(param / 10) + 1;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
char hexChar(int v) {
|
||||||
|
v = v & 0xF;
|
||||||
|
if (v < 10)
|
||||||
|
return (char)('0' + v);
|
||||||
|
return 'A' - 10 + v;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
void chVTSetAny(virtual_timer_t *vtp, systime_t time, vtfunc_t vtfunc, void *par) {
|
||||||
|
bool wasLocked = lockAnyContext();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* todo: this could be simplified once we migrate to ChibiOS 3.0
|
||||||
|
* See http://www.chibios.org/dokuwiki/doku.php?id=chibios:howtos:porting_from_2_to_3
|
||||||
|
*/
|
||||||
|
if (chVTIsArmedI(vtp)) {
|
||||||
|
chVTResetI(vtp);
|
||||||
|
}
|
||||||
|
|
||||||
|
chVTSetI(vtp, time, vtfunc, par);
|
||||||
|
if (!wasLocked) {
|
||||||
|
unlockAnyContext();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* @file rfiutil.h
|
||||||
|
* @brief Number to string conversion header
|
||||||
|
*
|
||||||
|
* @date Nov 15, 2012
|
||||||
|
* @author Andrey Belomutskiy, (c) 2012-2016
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef RFIUTIL_H_
|
||||||
|
#define RFIUTIL_H_
|
||||||
|
|
||||||
|
#include "global.h"
|
||||||
|
#include "histogram.h"
|
||||||
|
|
||||||
|
#define isLocked() (dbg_lock_cnt > 0)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unfortunately ChibiOS has two versions of methods for different
|
||||||
|
* contexts.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define isIsrContext() (dbg_isr_cnt > 0)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
//char hexC(int v);
|
||||||
|
void chVTSetAny(virtual_timer_t *vtp, systime_t time, vtfunc_t vtfunc, void *par);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
void printHistogram(Logging *logging, histogram_s *histogram);
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* RFIUTIL_H_ */
|
|
@ -372,9 +372,7 @@ void initHardware(Logging *l) {
|
||||||
initVehicleSpeed(sharedLogger);
|
initVehicleSpeed(sharedLogger);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAL_USE_EXT || defined(__DOXYGEN__)
|
|
||||||
initJoystick(sharedLogger);
|
initJoystick(sharedLogger);
|
||||||
#endif
|
|
||||||
|
|
||||||
calcFastAdcIndexes();
|
calcFastAdcIndexes();
|
||||||
engine->addConfigurationListener(adcConfigListener);
|
engine->addConfigurationListener(adcConfigListener);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// This file was generated by Version2Header
|
// This file was generated by Version2Header
|
||||||
// Thu Feb 11 19:42:49 EST 2016
|
// Thu Feb 11 14:16:47 EST 2016
|
||||||
#ifndef VCS_VERSION
|
#ifndef VCS_VERSION
|
||||||
#define VCS_VERSION "9550"
|
#define VCS_VERSION "9535"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
UTIL_TEST_SRC = $(PROJECT_DIR)/util/crc.c \
|
UTIL_TEST_SRC = $(PROJECT_DIR)/util/crc.c \
|
||||||
$(PROJECT_DIR)/rfiutil.c \
|
|
||||||
$(PROJECT_DIR)/util/data_buffer.c \
|
$(PROJECT_DIR)/util/data_buffer.c \
|
||||||
$(PROJECT_DIR)/util/histogram.c
|
$(PROJECT_DIR)/util/histogram.c
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue