spaces into multiplication
This commit is contained in:
parent
22a9e55c03
commit
02f08808ef
|
@ -83,7 +83,7 @@ struct_no_prefix engine_configuration_s
|
|||
#define BANKS_COUNT 2
|
||||
#define CAMS_PER_BANK 2
|
||||
|
||||
#define CAM_INPUTS_COUNT @@BANKS_COUNT@@*@@CAMS_PER_BANK@@
|
||||
#define CAM_INPUTS_COUNT @@BANKS_COUNT@@ * @@CAMS_PER_BANK@@
|
||||
|
||||
#define SERVO_COUNT 8
|
||||
|
||||
|
@ -93,11 +93,11 @@ struct_no_prefix engine_configuration_s
|
|||
|
||||
#define TOOTH_PACKET_COUNT 1000
|
||||
#define TOOTH_PACKET_SIZE 2
|
||||
#define TOOTH_DATA_LENGTH @@TOOTH_PACKET_SIZE@@*@@TOOTH_PACKET_COUNT@@
|
||||
#define TOOTH_DATA_LENGTH @@TOOTH_PACKET_SIZE@@ * @@TOOTH_PACKET_COUNT@@
|
||||
|
||||
#define COMPOSITE_PACKET_COUNT 500
|
||||
#define COMPOSITE_PACKET_SIZE 5
|
||||
#define COMPOSITE_DATA_LENGTH @@COMPOSITE_PACKET_SIZE@@*@@COMPOSITE_PACKET_COUNT@@
|
||||
#define COMPOSITE_DATA_LENGTH @@COMPOSITE_PACKET_SIZE@@ * @@COMPOSITE_PACKET_COUNT@@
|
||||
#define COMPOSITE_DATA_LENGTH_HALF 1250
|
||||
|
||||
#define MAP_ANGLE_SIZE 8
|
||||
|
|
Binary file not shown.
|
@ -113,7 +113,7 @@ public class ReaderState {
|
|||
|
||||
int multPosition = customSize.indexOf(MULT_TOKEN);
|
||||
if (multPosition != -1) {
|
||||
String firstPart = customSize.substring(0, multPosition);
|
||||
String firstPart = customSize.substring(0, multPosition).trim();
|
||||
int first;
|
||||
try {
|
||||
first = Integer.parseInt(firstPart);
|
||||
|
|
|
@ -104,8 +104,8 @@ public class VariableRegistry {
|
|||
value = applyVariables(value);
|
||||
int multPosition = value.indexOf(MULT_TOKEN);
|
||||
if (!isQuoted(value, '"') && multPosition != -1) {
|
||||
Integer first = Integer.valueOf(value.substring(0, multPosition));
|
||||
Integer second = Integer.valueOf(value.substring(multPosition + 1));
|
||||
Integer first = Integer.valueOf(value.substring(0, multPosition).trim());
|
||||
Integer second = Integer.valueOf(value.substring(multPosition + 1).trim());
|
||||
value = String.valueOf(first * second);
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ public class ConfigFieldParserTest {
|
|||
String test = "struct pid_s\n" +
|
||||
"#define ERROR_BUFFER_SIZE 120\n" +
|
||||
"#define ERROR_BUFFER_COUNT 120\n" +
|
||||
"#define RESULT @@ERROR_BUFFER_SIZE@@*@@ERROR_BUFFER_COUNT@@\n" +
|
||||
"#define RESULT @@ERROR_BUFFER_SIZE@@ * @@ERROR_BUFFER_COUNT@@\n" +
|
||||
"\tint16_t periodMs;PID dTime;\"ms\", 1, 0, 0, 3000, 0\n" +
|
||||
"end_struct\n" +
|
||||
"";
|
||||
|
|
Loading…
Reference in New Issue