Viewing 2 reply threads
  • Author
    Posts
    • #6504
      VenderwelVenderwel
      Participant

      I don’t know what I am doing wrong, but my build won’t work.

      It is an esp8622 board of some sort.

      Compiling .pio\build\esp12e\src\main.cpp.o
      In file included from src\main.cpp:42:
      include/MLC.h:58:36: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      58 | float servoAnglePrimaryBooms = levelCrossingConfiguration.bbAnglePrimaryUp;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      include/MLC.h:59:38: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      59 | float servoAngleSecondaryBooms = levelCrossingConfiguration.bbAngleSecondaryUp;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      include/MLC.h:61:42: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      61 | float servoTargetAnglePrimaryBooms = levelCrossingConfiguration.bbAnglePrimaryUp;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      include/MLC.h:62:44: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      62 | float servoTargetAngleSecondaryBooms = levelCrossingConfiguration.bbAngleSecondaryUp;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      src\main.cpp: In function ‘void mqttCallback(char*, byte*, unsigned int)’:
      src\main.cpp:264:54: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      264 | if (LEVEL_CROSSING_CONNECTED && (rr_port1 == levelCrossingConfiguration.rocRailPort)) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      src\main.cpp:273:54: error: ‘bridgeConfiguration’ was not declared in this scope; did you mean ‘TBridgeConfiguration’?
      273 | if (BASCULE_BRIDGE_CONNECTED && (rr_port1 == bridgeConfiguration.rocRailPort)) {
      | ^~~~~~~~~~~~~~~~~~~
      | TBridgeConfiguration
      src\main.cpp: In function ‘void handleSignalMessageControlTypeDefault(int)’:
      src\main.cpp:576:17: error: ‘signalConfiguration’ was not declared in this scope; did you mean ‘TSignalConfiguration’?
      576 | if (signalConfiguration[s].aspectRocrailPort[a] == rr_port) {
      | ^~~~~~~~~~~~~~~~~~~
      | TSignalConfiguration
      src\main.cpp: In function ‘void handleSignalMessageControlTypeAspectNumbers(int, int)’:
      src\main.cpp:594:13: error: ‘signalConfiguration’ was not declared in this scope; did you mean ‘TSignalConfiguration’?
      594 | if (signalConfiguration[s].signalRocrailPort == rr_port1) {
      | ^~~~~~~~~~~~~~~~~~~
      | TSignalConfiguration
      src\main.cpp: In function ‘void setSignalAspect(int, int)’:
      src\main.cpp:616:22: error: ‘signalConfiguration’ was not declared in this scope; did you mean ‘TSignalConfiguration’?
      616 | bool onOff = signalConfiguration[s].aspectLEDMapping[a][l];
      | ^~~~~~~~~~~~~~~~~~~
      | TSignalConfiguration
      src\main.cpp:624:13: error: ‘signalConfiguration’ was not declared in this scope; did you mean ‘TSignalConfiguration’?
      624 | if (signalConfiguration[s].servoIndex[servoIndex] >= 0) {
      | ^~~~~~~~~~~~~~~~~~~
      | TSignalConfiguration
      src\main.cpp: In function ‘void handleSignalOvershootSensorEvent(int)’:
      src\main.cpp:635:13: error: ‘signalConfiguration’ was not declared in this scope; did you mean ‘TSignalConfiguration’?
      635 | if (signalConfiguration[s].overshootSensorIndex == overshootSensorIndex) {
      | ^~~~~~~~~~~~~~~~~~~
      | TSignalConfiguration
      src\main.cpp: In function ‘void levelCrossingCommand(int)’:
      src\main.cpp:977:18: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      977 | if (!levelCrossingConfiguration.autonomousModeEnabled || !lcIsOccupied()) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      src\main.cpp:991:58: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      991 | levelCrossing.servoTargetAnglePrimaryBooms = levelCrossingConfiguration.bbAnglePrimaryDown;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      src\main.cpp: In function ‘void boomBarrierLoop()’:
      src\main.cpp:1031:66: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      1031 | || now_ms >= levelCrossing.lastStatusChangeTime_ms + levelCrossingConfiguration.bbClosingDelayPrimary_ms
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      src\main.cpp:1054:66: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      1054 | || now_ms >= levelCrossing.lastStatusChangeTime_ms + levelCrossingConfiguration.bbClosingDelaySecondary_ms
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      src\main.cpp:1073:23: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      1073 | setServoAngle(levelCrossingConfiguration.servoIndex[bb], (bb < 2) ? levelCrossing.servoAnglePrimaryBooms : levelCrossing.servoAngleSecondaryBooms);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      src\main.cpp:1080:34: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      1080 | sendSensorEvent2MQTT(levelCrossingConfiguration.sensorIndexBoomsOpened, true);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      src\main.cpp:1082:34: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      1082 | sendSensorEvent2MQTT(levelCrossingConfiguration.sensorIndexBoomsClosed, true);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      src\main.cpp: In function ‘void levelCrossingLightLoop()’:
      src\main.cpp:1092:38: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      1092 | bool alternatePeriod = (now_ms % levelCrossingConfiguration.ledFlashingPeriod_ms) > (levelCrossingConfiguration.ledFlashingPeriod_ms / 2);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      src\main.cpp: In function ‘void handleLevelCrossingSensorEvent(int)’:
      src\main.cpp:1113:39: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      1113 | if (!LEVEL_CROSSING_CONNECTED || !levelCrossingConfiguration.autonomousModeEnabled)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      src\main.cpp:1121:32: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      1121 | if (triggeredSensor == levelCrossingConfiguration.sensorConfiguration[lcs].sensorIndex) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      src\main.cpp: In function ‘void levelCrossingLoop()’:
      src\main.cpp:1233:13: error: ‘levelCrossingConfiguration’ was not declared in this scope; did you mean ‘TLevelCrossingConfiguration’?
      1233 | if (levelCrossingConfiguration.autonomousModeEnabled) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      | TLevelCrossingConfiguration
      src\main.cpp: In function ‘void setBridgeMotorPower(int, int)’:
      src\main.cpp:1267:19: error: ‘bridgeConfiguration’ was not declared in this scope; did you mean ‘TBridgeConfiguration’?
      1267 | setServoAngle(bridgeConfiguration.leafConfiguration[leafIndex].servoIndex, motorPower + 100);
      | ^~~~~~~~~~~~~~~~~~~
      | TBridgeConfiguration
      src\main.cpp: In function ‘void setBridgeLights()’:
      src\main.cpp:1279:16: error: ‘bridgeConfiguration’ was not declared in this scope; did you mean ‘TBridgeConfiguration’?
      1279 | setLED(bridgeConfiguration.signalRiverStop, true);
      | ^~~~~~~~~~~~~~~~~~~
      | TBridgeConfiguration
      src\main.cpp: In function ‘void basculeBridgeLoop()’:
      src\main.cpp:1391:34: error: ‘bridgeConfiguration’ was not declared in this scope; did you mean ‘TBridgeConfiguration’?
      1391 | sendSensorEvent2MQTT(bridgeConfiguration.sensorFullyDown, true);
      | ^~~~~~~~~~~~~~~~~~~
      | TBridgeConfiguration
      src\main.cpp: In function ‘void processBridgeLeaf(int)’:
      src\main.cpp:1481:33: error: ‘bridgeConfiguration’ was not declared in this scope; did you mean ‘TBridgeConfiguration’?
      1481 | bool sensorUp = sensorState[bridgeConfiguration.leafConfiguration[leafIndex].sensorUp];
      | ^~~~~~~~~~~~~~~~~~~
      | TBridgeConfiguration
      src\main.cpp: In function ‘void handleSpeedometerSensorEvent(int)’:
      src\main.cpp:1814:9: error: ‘speedometerConfiguration’ was not declared in this scope; did you mean ‘TSpeedometerConfiguration’?
      1814 | if (speedometerConfiguration.sensorIndex[0] != triggeredSensor && speedometerConfiguration.sensorIndex[1] != triggeredSensor) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~
      | TSpeedometerConfiguration
      src\main.cpp:1850:45: error: ‘speedometerConfiguration’ was not declared in this scope; did you mean ‘TSpeedometerConfiguration’?
      1850 | speedometer.trainSpeed[wcEnd] = speedometerConfiguration.distance / timeDiffSpeed;
      | ^~~~~~~~~~~~~~~~~~~~~~~~
      | TSpeedometerConfiguration
      src\main.cpp:1878:60: error: ‘speedometerConfiguration’ was not declared in this scope; did you mean ‘TSpeedometerConfiguration’?
      1878 | if (millis() >= speedometer.lastMeasurementEvent + speedometerConfiguration.timeOut) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~
      | TSpeedometerConfiguration
      src\main.cpp:1891:76: error: ‘speedometerConfiguration’ was not declared in this scope; did you mean ‘TSpeedometerConfiguration’?
      1891 | if (!speedometer.occupied && millis() – speedometer.measurementDone >= speedometerConfiguration.timeBetweenMeasurements) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~
      | TSpeedometerConfiguration
      src\main.cpp: In function ‘void speedometerLoop()’:
      src\main.cpp:1914:60: error: ‘speedometerConfiguration’ was not declared in this scope; did you mean ‘TSpeedometerConfiguration’?
      1914 | if (millis() >= speedometer.lastMeasurementEvent + speedometerConfiguration.timeOut) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~
      | TSpeedometerConfiguration
      src\main.cpp:1931:76: error: ‘speedometerConfiguration’ was not declared in this scope; did you mean ‘TSpeedometerConfiguration’?
      1931 | if (!speedometer.occupied && actMillis – speedometer.measurementDone < speedometerConfiguration.timeBetweenMeasurements && actMillis – speedometer.lastMeasurementEvent > 1000) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~
      | TSpeedometerConfiguration
      *** [.pio\build\esp12e\src\main.cpp.o] Error 1

      • This topic was modified 6 months ago by Venderwel.
    • #6514
      Hilbert BHilbert B
      Moderator

      Hi,

      It looks like you have no or empty configuration files.

      In main.cpp you have on the top op the file:

      #include

      #include “../conf/my/controller_config.h”
      #include “../conf/my/network_config.h”

      #include “MLC_check.h”

      The ../conf/my include files may not me empty, the easiest thing to do is to copy the default ones (situated in ../conf/default) alter them to fit your configuration.

      As a best practice, do not edit the ../conf/default one’s, these will be overwritten when you update/download new versions of the source.

      Hilbert

    • #6542
      VenderwelVenderwel
      Participant

      I think I disabled a few lines in the code, because at first they gave errors red (underlines) when I opened the files. And I thought I didn’t need them. Now I see they don’t give errors anymore (no more red underlines) No Idea how, but reabled the lines and all works like a charm!

Viewing 2 reply threads
  • You must be logged in to reply to this topic.