shameless reminder about time-sensitive Proteus fabrication issue which worries me
This commit is contained in:
parent
f3897cda58
commit
4db874a607
|
@ -1,18 +0,0 @@
|
|||
// generated by gen_live_documentation.sh / UsagesReader.java
|
||||
#define FRAGMENT_OUTPUT_CHANNELS_SIZE 640
|
||||
#define FRAGMENT_HIGH_PRESSURE_FUEL_PUMP_SIZE 24
|
||||
#define FRAGMENT_INJECTOR_MODEL_SIZE 12
|
||||
#define FRAGMENT_LAUNCH_CONTROL_STATE_SIZE 4
|
||||
#define FRAGMENT_BOOST_CONTROL_SIZE 12
|
||||
#define FRAGMENT_AC_CONTROL_SIZE 12
|
||||
#define FRAGMENT_FAN_CONTROL_SIZE 0
|
||||
#define FRAGMENT_FUEL_PUMP_CONTROL_SIZE 0
|
||||
#define FRAGMENT_MAIN_RELAY_SIZE 0
|
||||
#define FRAGMENT_ENGINE_STATE_SIZE 128
|
||||
#define FRAGMENT_TPS_ACCEL_STATE_SIZE 48
|
||||
#define FRAGMENT_TRIGGER_CENTRAL_SIZE 28
|
||||
#define FRAGMENT_TRIGGER_STATE_SIZE 8
|
||||
#define FRAGMENT_WALL_FUEL_STATE_SIZE 8
|
||||
#define FRAGMENT_IDLE_STATE_SIZE 32
|
||||
#define FRAGMENT_IGNITION_STATE_SIZE 16
|
||||
#define FRAGMENT_ELECTRONIC_THROTTLE_SIZE 12
|
|
@ -838,7 +838,6 @@ int TunerStudio::handleCrcCommand(TsChannelBase* tsChannel, char *data, int inco
|
|||
void startTunerStudioConnectivity(void) {
|
||||
// Assert tune & output channel struct sizes
|
||||
static_assert(sizeof(persistent_config_s) == TOTAL_CONFIG_SIZE, "TS datapage size mismatch");
|
||||
static_assert(sizeof(TunerStudioOutputChannels) == FRAGMENT_OUTPUT_CHANNELS_SIZE, "TS output channels size mismatch");
|
||||
// useful trick if you need to know how far off is the static_assert
|
||||
// char (*__kaboom)[sizeof(persistent_config_s)] = 1;
|
||||
|
||||
|
|
|
@ -12,5 +12,4 @@ COMMON_GEN_CONFIG="
|
|||
-with_c_defines false \
|
||||
-initialize_to_zero false \
|
||||
-prepend console/binary/generated/total_live_data_generated.h \
|
||||
-prepend console/binary/generated/fragments_meta.h \
|
||||
-definition integration/rusefi_config.txt"
|
||||
|
|
Binary file not shown.
|
@ -44,7 +44,6 @@ public class UsagesReader {
|
|||
StringBuilder totalSensors = new StringBuilder();
|
||||
|
||||
StringBuilder fancyNewStuff = new StringBuilder();
|
||||
StringBuilder fragmentsMeta = new StringBuilder(header);
|
||||
|
||||
UsagesReader usagesReader = new UsagesReader();
|
||||
|
||||
|
@ -95,7 +94,6 @@ public class UsagesReader {
|
|||
fancyNewStuff.append(fragmentDialogConsumer.getContent());
|
||||
|
||||
int size = usagesReader.sensorTsPosition - startingPosition;
|
||||
fragmentsMeta.append("#define FRAGMENT_" + name.toUpperCase() + "_SIZE " + size + "\n");
|
||||
|
||||
log.info("Done with " + name + " at " + usagesReader.sensorTsPosition);
|
||||
}
|
||||
|
@ -110,10 +108,6 @@ public class UsagesReader {
|
|||
fw.write("#define TS_TOTAL_OUTPUT_SIZE " + usagesReader.sensorTsPosition);
|
||||
}
|
||||
|
||||
try (FileWriter fw = new FileWriter("console/binary/generated/fragments_meta.h")) {
|
||||
fw.write(fragmentsMeta.toString());
|
||||
}
|
||||
|
||||
try (FileWriter fw = new FileWriter("console/binary/generated/sensors.java")) {
|
||||
fw.write(totalSensors.toString());
|
||||
}
|
||||
|
|
|
@ -78,8 +78,9 @@ public class BaseCHeaderConsumer implements ConfigurationConsumer {
|
|||
iterator.end();
|
||||
}
|
||||
|
||||
content.append("\t/** total size " + iterator.currentOffset + "*/" + EOL);
|
||||
content.append("};" + EOL + EOL);
|
||||
content.append("};" + EOL);
|
||||
content.append("static_assert(sizeof(" + structure.name + ") == " + iterator.currentOffset + ");\n");
|
||||
content.append(EOL);
|
||||
}
|
||||
|
||||
public StringBuilder getContent() {
|
||||
|
|
|
@ -290,8 +290,8 @@ public class ConfigFieldParserTest {
|
|||
"\t * offset 0\n" +
|
||||
"\t */\n" +
|
||||
"\tscaled_channel<int, 100, 1> field[ERROR_BUFFER_SIZE];\n" +
|
||||
"\t/** total size 4*/\n" +
|
||||
"};\n" +
|
||||
"static_assert(sizeof(pid_s) == 4);\n" +
|
||||
"\n", consumer.getContent().toString());
|
||||
}
|
||||
|
||||
|
|
|
@ -85,8 +85,8 @@ public class TSProjectConsumerTest {
|
|||
"\t * offset 18\n" +
|
||||
"\t */\n" +
|
||||
"\tint16_t periodMs = (int16_t)0;\n" +
|
||||
"\t/** total size 20*/\n" +
|
||||
"};\n" +
|
||||
"static_assert(sizeof(pid_s) == 20);\n" +
|
||||
"\n", consumer.getContent().toString());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue