Refactoring, technical debt: export more of trigger attributes into triggers.txt file #2077
This commit is contained in:
parent
116f0cf81e
commit
3dbee88f53
|
@ -118,7 +118,6 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this variable is incremented after each trigger shape redefinition
|
* this variable is incremented after each trigger shape redefinition
|
||||||
* See also
|
|
||||||
*/
|
*/
|
||||||
int version = 0;
|
int version = 0;
|
||||||
|
|
||||||
|
|
|
@ -194,6 +194,7 @@ struct_no_prefix engine_configuration_s
|
||||||
#define TRIGGER_IS_CRANK_KEY "crankBased"
|
#define TRIGGER_IS_CRANK_KEY "crankBased"
|
||||||
#define TRIGGER_IS_SECOND_WHEEL_CAM "isSecondWheelCam"
|
#define TRIGGER_IS_SECOND_WHEEL_CAM "isSecondWheelCam"
|
||||||
#define TRIGGER_HAS_SECOND_CHANNEL "hasSecondChannel"
|
#define TRIGGER_HAS_SECOND_CHANNEL "hasSecondChannel"
|
||||||
|
#define TRIGGER_HARDCODED_OPERATION_MODE "knownOperationMode"
|
||||||
|
|
||||||
!
|
!
|
||||||
! all the xxx_PACKING_xxx constants are about persisting tables in compact for, for example packing RPM with 50 increment in a byte
|
! all the xxx_PACKING_xxx constants are about persisting tables in compact for, for example packing RPM with 50 increment in a byte
|
||||||
|
|
|
@ -67,9 +67,10 @@ TEST_P(AllTriggersFixture, TestTrigger) {
|
||||||
ASSERT_FALSE(shape->shapeDefinitionError) << "Trigger shapeDefinitionError";
|
ASSERT_FALSE(shape->shapeDefinitionError) << "Trigger shapeDefinitionError";
|
||||||
|
|
||||||
fprintf(fp, "TRIGGERTYPE %d %d %s %.2f\n", tt, shape->getLength(), getTrigger_type_e(tt), shape->tdcPosition);
|
fprintf(fp, "TRIGGERTYPE %d %d %s %.2f\n", tt, shape->getLength(), getTrigger_type_e(tt), shape->tdcPosition);
|
||||||
// todo: use getCrankDivider insread to support symmetrical crank wheels?
|
// todo: use getCrankDivider instead to support symmetrical crank wheels?
|
||||||
fprintf(fp, "%s=%s\n", TRIGGER_IS_CRANK_KEY, shape->getOperationMode() == FOUR_STROKE_CRANK_SENSOR ? "true" : "false");
|
fprintf(fp, "%s=%s\n", TRIGGER_IS_CRANK_KEY, shape->getOperationMode() == FOUR_STROKE_CRANK_SENSOR ? "true" : "false");
|
||||||
fprintf(fp, "%s=%s\n", TRIGGER_IS_SECOND_WHEEL_CAM, shape->isSecondWheelCam ? "true" : "false");
|
fprintf(fp, "%s=%s\n", TRIGGER_IS_SECOND_WHEEL_CAM, shape->isSecondWheelCam ? "true" : "false");
|
||||||
|
fprintf(fp, "%s=%s\n", TRIGGER_HAS_SECOND_CHANNEL, shape->needSecondTriggerInput ? "true" : "false");
|
||||||
fprintf(fp, "# duty %.2f %.2f\n", shape->expectedDutyCycle[0], shape->expectedDutyCycle[1]);
|
fprintf(fp, "# duty %.2f %.2f\n", shape->expectedDutyCycle[0], shape->expectedDutyCycle[1]);
|
||||||
|
|
||||||
for (size_t i = 0; i < shape->getLength(); i++) {
|
for (size_t i = 0; i < shape->getLength(); i++) {
|
||||||
|
|
Loading…
Reference in New Issue