Viewing 7 reply threads
  • Author
    Posts
    • #5532
      Martin WittMartin Witt
      Participant

      Hello all,

      Since a couple of weeks i made the call to get my lego trains going automaticly.
      So i thought!!

      I bought a pcb and a sbrick and gave it a go untill my programings skills on the pc didnt meet the requirement.

      After visiting a friend who knows a bit more about programming i had high hopes.

      After a long night we couldn’t figure it out to get all the software to the pcb.

      Is there someone that speaks dutch here to help me? Or maybe i can sent my pcb by mail with the wifi info from my network.

      Happy to hear something.

      Regards Martin,

      • This topic was modified 1 year, 5 months ago by Martin WittMartin Witt.
    • #5534
      Joos BuijsJoos Buijs
      Keymaster

      Hoi Martin,

      Welkom op het forum! Leuk dat je je Lego treinbaan wil automatiseren met MattzoBricks, hopelijk kunnen we je helpen het aan de praat te krijgen.

      Ik neem aan dat je een esp32 als pcb hebt gekocht om een MTC4BT aan de praat te krijgen die je sbrick kan aansturen?

      Kun je aangeven waar je in de stappen zoals hier beschreven vast loopt?: https://mattzobricks.com/controllers/mtc4bt

      Met vriendelijke groet,
      Joos

    • #5548
      Martin WittMartin Witt
      Participant

      Hallo Joos,

      Ik weet niet of we hier engels moeten spreken maar zo ja vertaal ik het wel.

      Heb wat foto’s gemaakt waar we tegenaan liepen. Ik zie dat ik deze hier niet kan uploaden. Mag ik zie mesenger versturen?

      Mvg Martin,

    • #5550
      Joos BuijsJoos Buijs
      Keymaster

      Hoi Martin,

      De voorkeurstaal is idd Engels, maar Duits en Nederlands mag ook 🙂 Anders post ik wel een slot-post met in het Engels het probleem en de oplossing 🙂

      Kun je de foto’s ergens anders uploaden en de links hier delen? Dan kunnen anderen ook makkelijk meedenken en -lezen.

      Groet,
      Joos

    • #5551
      Martin WittMartin Witt
      Participant

      Ok, this is what i found;

      ‘#include <vector>’?

      src/BLELocomotiveConfiguration.h:5:1:

      +#include <vector>

      src/BLELocomotiveConfiguration.h:13:5:

      std::vector<BLEHubConfiguration *> _hubs;

      ^~~

      src/BLELocomotiveConfiguration.h:14:10: error: ‘vector’ in namespace ‘std’ does not name a template type

      std::vector<MCFunctionBinding *> _functions;

      ^~~~~~

      src/BLELocomotiveConfiguration.h:14:5: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?

      std::vector<MCFunctionBinding *> _functions;

      ^~~

      src/BLELocomotiveConfiguration.cpp:6:93: error: ‘std::vector’ has not been declared

      BLELocomotiveConfiguration::BLELocomotiveConfiguration(uint address, std::string name, std::vector<BLEHubConfiguration *> hubs, std::vector<MCFunctionBinding *> functions, int16_t speedStep, int16_t brakeStep, int16_t lightPerc, bool autoLightsEnabled, bool enabled)

      ^~~~~~

      src/BLELocomotiveConfiguration.cpp:6:99: error: expected ‘,’ or ‘…’ before ‘<‘ token

      BLELocomotiveConfiguration::BLELocomotiveConfiguration(uint address, std::string name, std::vector<BLEHubConfiguration *> hubs, std::vector<MCFunctionBinding *> functions, int16_t speedStep, int16_t brakeStep, int16_t lightPerc, bool autoLightsEnabled, bool enabled)

      ^

      src/BLELocomotiveConfiguration.cpp: In constructor
      ‘BLELocomotiveConfiguration::BLELocomotiveConfiguration(uint, std::__cxx11::string, int)’:

      src/BLELocomotiveConfiguration.cpp:10:5: error: ‘_hubs’ was not declared in this scope

      _hubs = hubs;

      ^~~~~

      src/BLELocomotiveConfiguration.cpp:10:5: note: suggested alternative: ‘_abs’

      _hubs = hubs;

      ^~~~~

      _abs

      src/BLELocomotiveConfiguration.cpp:10:13: error: ‘hubs’ was not declared in this scope _hubs = hubs;

      ^~~~

      src/BLELocomotiveConfiguration.cpp:10:13: note: suggested alternative: ‘labs’

      _hubs = hubs;

      ^~~~

      labs

      src/BLELocomotiveConfiguration.cpp:11:5: error: ‘_functions’ was not declared in this scope

      _functions = functions;

      ^~~~~~~~~~

      src/BLELocomotiveConfiguration.cpp:11:5: note: suggested alternative: ‘functionMap’

      _functions = functions;

      ^~~~~~~~~~

      functionMap

      src/BLELocomotiveConfiguration.cpp:11:18: error: ‘functions’ was not declared in this scope

      _functions = functions;

      ^~~~~~~~~

      src/BLELocomotiveConfiguration.cpp:11:18: note: suggested alternative: ‘functionMap’

      _functions = functions;

      ^~~~~~~~~

      functionMap

      src/BLELocomotiveConfiguration.cpp:12:18: error: ‘speedStep’ was not declared in this scope

      _speedStep = speedStep;

      ^~~~~~~~~

      src/BLELocomotiveConfiguration.cpp:12:18: note: suggested alternative: ‘_speedStep’

      _speedStep = speedStep;

      ^~~~~~~~~

      _speedStep

      src/BLELocomotiveConfiguration.cpp:13:18: error: ‘brakeStep’ was not declared in this scope

      _brakeStep = brakeStep;

      ^~~~~~~~~

      src/BLELocomotiveConfiguration.cpp:13:18: note: suggested alternative: ‘_brakeStep’

      _brakeStep = brakeStep;

      ^~~~~~~~~

      _brakeStep

      src/BLELocomotiveConfiguration.cpp:14:18: error: ‘lightPerc’ was not declared in this scope

      _lightPerc = lightPerc;

      ^~~~~~~~~

      src/BLELocomotiveConfiguration.cpp:14:18: note: suggested alternative: ‘_lightPerc’

      _lightPerc = lightPerc;

      ^~~~~~~~~

      _lightPerc

      src/BLELocomotiveConfiguration.cpp:15:26: error: ‘autoLightsEnabled’ was not declared in this scope

      _autoLightsEnabled = autoLightsEnabled;

      ^~~~~~~~~~~~~~~~~

      src/BLELocomotiveConfiguration.cpp:15:26: note: suggested alternative: ‘_autoLightsEnabled’

      _autoLightsEnabled = autoLightsEnabled;

      ^~~~~~~~~~~~~~~~~

      _autoLightsEnabled

      src/BLELocomotiveConfiguration.cpp:16:16: error: ‘enabled’ was not declared in this scope

      _enabled = enabled;

      ^~~~~~~

      src/BLELocomotiveConfiguration.cpp:16:16: note: suggested alternative: ‘_enabled’

      _enabled = enabled;

      ^~~~~~~

      _enabled

      src/MTC4BTController.cpp: In member function ‘void MTC4BTController::Setup(MTC4BTConfiguration*)’:

      src/MTC4BTController.cpp:39:29: error: ‘struct MTC4BTConfiguration’ has no member named ‘Locomotives’

      initLocomotives(config->Locomotives);

      ^~~~~~~~~~~

      [.pio\build\az-delivery-devkit-v4\src\BLELocomotiveConfiguration.cpp.o] Error 1
      [.pio\build\az-delivery-devkit-v4\src\MTC4BTController.cpp.o] Error 1

      =========================================================================== [FAILED] Took 6.28 seconds

      Terminal will be reused by tasks, press any key to close it.
      Document voltooid

    • #5570
      Martin WittMartin Witt
      Participant

      Hallo Joos,

      Weet niet of je mijn post heb gezien of er wat mee kan? Hoor het graag.

      Mvg Martin,

    • #5576
      Matthias RunteMatthias Runte
      Keymaster

      Released V0.6.1 with a bugfix for the MTC4BT. Hope it helps.

    • #5593
      Stefan MaderStefan Mader
      Participant

      For those who don’t want to upgrade, here is what I found out about the problem and how you can fix it yourself (as already posted in a different post):

      The compiler threw several errors, the only relevant of them was:
      ‘std::vector’ has not been declared

      After some searching I found
      https://stackoverflow.com/a/38228651/1765341
      which said that
      #include <vector>
      should always be used in classes that use vector.
      After adding that line to 6 files that were in error, everything compiled fine.

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