mirror of https://github.com/FOME-Tech/fome-fw.git
New parser writes output channel c structs (#350)
* new parser writes c structs * jar * missing defs for simulator * don't put defines you need in live data txt
This commit is contained in:
parent
5dc0a2a167
commit
76708670a0
|
@ -7,10 +7,11 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
#include <stdbool.h>
|
||||
#include <float.h>
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#if defined __GNUC__
|
||||
// GCC
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#define HW_EVENT_TYPES 6
|
||||
|
||||
struct_no_prefix trigger_central_s
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@ Usages:
|
|||
folder: controllers/trigger
|
||||
withCDefines: true
|
||||
constexpr: "engine->triggerCentral"
|
||||
prepend: integration/rusefi_config_shared.txt
|
||||
conditional_compilation: "EFI_SHAFT_POSITION_INPUT"
|
||||
|
||||
- name: trigger_state
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#define BOOST_BLEND_COUNT 2
|
||||
#define LUA_GAUGE_COUNT 2
|
||||
|
||||
#define HW_EVENT_TYPES 6
|
||||
|
||||
#define GAUGE_NAME_VERSION "firmware"
|
||||
#define GAUGE_NAME_UPTIME "Uptime"
|
||||
|
|
Binary file not shown.
|
@ -6,6 +6,7 @@ import com.rusefi.InvokeReader;
|
|||
import com.rusefi.ReaderStateImpl;
|
||||
import com.rusefi.RusefiParseErrorStrategy;
|
||||
import com.rusefi.newparse.ParseState;
|
||||
import com.rusefi.newparse.outputs.CStructWriter;
|
||||
import com.rusefi.newparse.parsing.Definition;
|
||||
import com.rusefi.output.*;
|
||||
import com.rusefi.util.LazyFile;
|
||||
|
@ -120,13 +121,12 @@ public class LiveDataProcessor {
|
|||
state.addPrepend(extraPrepend);
|
||||
state.addPrepend(prepend);
|
||||
String cHeaderDestination = folder + File.separator + name + "_generated.h";
|
||||
state.addCHeaderDestination(cHeaderDestination);
|
||||
|
||||
int baseOffset = outputsSections.getBaseOffset();
|
||||
|
||||
if (javaName != null) {
|
||||
state.addDestination(new FileJavaFieldsConsumer(state, "../java_console/models/src/main/java/com/rusefi/config/generated/" + javaName, baseOffset));
|
||||
}
|
||||
if (javaName != null) {
|
||||
state.addDestination(new FileJavaFieldsConsumer(state, "../java_console/models/src/main/java/com/rusefi/config/generated/" + javaName, baseOffset));
|
||||
}
|
||||
|
||||
if (constexpr != null) {
|
||||
sdCardFieldsConsumer.home = constexpr;
|
||||
|
@ -151,8 +151,8 @@ public class LiveDataProcessor {
|
|||
|
||||
RusefiParseErrorStrategy.parseDefinitionFile(parseState.getListener(), state.getDefinitionInputFile());
|
||||
|
||||
// CStructWriter cStructs = new CStructWriter();
|
||||
// cStructs.writeCStructs(parseState, cHeaderDestination);
|
||||
CStructWriter cStructs = new CStructWriter();
|
||||
cStructs.writeCStructs(parseState, cHeaderDestination);
|
||||
|
||||
// if (outputNames.length == 0) {
|
||||
// outputChannelWriter.writeOutputChannels(parseState, null);
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue