Merge remote-tracking branch 'origin/master' into fresh_chibios_2nd
This commit is contained in:
commit
3553d3f59c
|
@ -5,8 +5,7 @@ rm -rf build\rusefi.hex
|
|||
rm -rf build\rusefi.bin
|
||||
|
||||
|
||||
rem todo add
|
||||
rem git submodule update --init
|
||||
git submodule update --init
|
||||
rem PS:
|
||||
rem git submodule update --recursive --remote
|
||||
rem magic once needed
|
||||
|
|
|
@ -554,7 +554,7 @@ void initAdcInputs(bool boardTestMode) {
|
|||
configureInputs();
|
||||
|
||||
// migrate to 'enable adcdebug'
|
||||
addConsoleActionI("adcDebug", &setAdcDebugReporting);
|
||||
addConsoleActionI("adcdebug", &setAdcDebugReporting);
|
||||
|
||||
#if EFI_INTERNAL_ADC
|
||||
/*
|
||||
|
|
|
@ -207,17 +207,6 @@ static void removeFile(const char *pathx) {
|
|||
unlockSpi();
|
||||
}
|
||||
|
||||
/*
|
||||
** return lower-case of c if upper-case, else c
|
||||
*/
|
||||
int mytolower(const char c) {
|
||||
|
||||
if(c<='Z' && c>='A') return (c+32);
|
||||
return (c);
|
||||
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
mystrncasecmp(const char *s1, const char *s2, size_t n)
|
||||
{
|
||||
|
@ -439,7 +428,7 @@ void initMmcCard(void) {
|
|||
chThdCreateStatic(mmcThreadStack, sizeof(mmcThreadStack), LOWPRIO, (tfunc_t) MMCmonThread, NULL);
|
||||
|
||||
addConsoleAction("mountsd", MMCmount);
|
||||
addConsoleActionS("appendToLog", appendToLog);
|
||||
addConsoleActionS("appendtolog", appendToLog);
|
||||
addConsoleAction("umountsd", MMCumount);
|
||||
addConsoleActionS("ls", listDirectory);
|
||||
addConsoleActionS("del", removeFile);
|
||||
|
|
|
@ -250,5 +250,5 @@ int getRusEfiVersion(void) {
|
|||
return 123; // this is here to make the compiler happy about the unused array
|
||||
if (UNUSED_CCM_SIZE[0] * 0 != 0)
|
||||
return 3211; // this is here to make the compiler happy about the unused array
|
||||
return 20170402;
|
||||
return 20170404;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
rem Let's regemerate 'svnversion.h'
|
||||
rem TODO: handle std err - for example, in case svn needs upgrade
|
||||
java -jar ../java_tools/version2header.jar 10000
|
||||
java -jar ../java_tools/version2header.jar 10000 https://github.com/rusefi/rusefi
|
|
@ -47,6 +47,12 @@ void resetConsoleActions(void) {
|
|||
static void doAddAction(const char *token, action_type_e type, Void callback, void *param) {
|
||||
efiAssertVoid(consoleActionCount < CONSOLE_MAX_ACTIONS, "Too many console actions");
|
||||
TokenCallback *current = &consoleActions[consoleActionCount++];
|
||||
for (int i = 0; i< efiStrlen(token);i++) {
|
||||
char ch = token[i];
|
||||
if (ch != mytolower(ch)) {
|
||||
firmwareError(CUSTOM_ERR_6140, "lowerCase expected [%s]", token);
|
||||
}
|
||||
}
|
||||
current->token = token;
|
||||
current->parameterType = type;
|
||||
current->callback = callback;
|
||||
|
|
|
@ -250,6 +250,13 @@ bool strEqualCaseInsensitive(const char *str1, const char *str2) {
|
|||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
** return lower-case of c if upper-case, else c
|
||||
*/
|
||||
int mytolower(const char c) {
|
||||
return TO_LOWER(c);
|
||||
}
|
||||
|
||||
bool strEqual(const char *str1, const char *str2) {
|
||||
// todo: there must be a standard function?!
|
||||
int len1 = strlen(str1);
|
||||
|
|
|
@ -38,6 +38,7 @@ extern "C"
|
|||
const char * boolToString(bool value);
|
||||
|
||||
char * efiTrim(char *param);
|
||||
int mytolower(const char c);
|
||||
uint32_t efiStrlen(const char *param);
|
||||
int efiPow10(int param);
|
||||
bool startsWith(const char *line, const char *prefix);
|
||||
|
|
Binary file not shown.
|
@ -9,22 +9,30 @@ import java.util.Date;
|
|||
public class Version2Header {
|
||||
private static final String NL = "\n";//System.getProperty("line.separator");
|
||||
|
||||
private static final String COMMAND = "svn info";
|
||||
private static final String COMMAND = "svn info ";
|
||||
private static final String VERSION_MARKER = "Last Changed Rev: ";
|
||||
private static final String HEADER_TAG = "VCS_VERSION";
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
if (args.length!=1) {
|
||||
if (args.length != 1 && args.length != 2) {
|
||||
System.out.println("Version offset value is now a mandatory parameter!");
|
||||
System.exit(-1);
|
||||
}
|
||||
int versionOffsetValue = Integer.parseInt(args[0]);
|
||||
String url = args.length == 2 ? args[1] : "";
|
||||
System.out.println("Hi, it's " + new Date());
|
||||
if (url.isEmpty()) {
|
||||
System.out.println("Looking for local version");
|
||||
} else {
|
||||
System.out.println("Looking for remove version: " + url);
|
||||
}
|
||||
String command = COMMAND + url;
|
||||
|
||||
System.out.println("Working with " + NL.length() + " line ends, offset " + versionOffsetValue);
|
||||
Process simulatorProcess = null;
|
||||
try {
|
||||
System.out.println("Executing [" + COMMAND + "]");
|
||||
simulatorProcess = Runtime.getRuntime().exec(COMMAND);
|
||||
System.out.println("Executing [" + command + "]");
|
||||
simulatorProcess = Runtime.getRuntime().exec(command);
|
||||
|
||||
BufferedReader stdout =
|
||||
new BufferedReader(new InputStreamReader(simulatorProcess.getInputStream()));
|
||||
|
@ -32,7 +40,7 @@ public class Version2Header {
|
|||
int counter = 0;
|
||||
String line;
|
||||
while ((line = stdout.readLine()) != null) {
|
||||
System.out.println("from " + COMMAND + ": " + line);
|
||||
System.out.println("from " + command + ": " + line);
|
||||
counter++;
|
||||
|
||||
if (line.startsWith(VERSION_MARKER)) {
|
||||
|
|
Loading…
Reference in New Issue