Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeVendActive #382

Open
NuriaParra8997 opened this issue Nov 4, 2024 · 0 comments
Open

FreeVendActive #382

NuriaParra8997 opened this issue Nov 4, 2024 · 0 comments

Comments

@NuriaParra8997
Copy link

NuriaParra8997 commented Nov 4, 2024

Hello Matth,

I have some questions regarding the freeVendActive mode when the device starts with a car already connected (B1 state). I took the liberty of adding some debug statements in this part:

  if (freeVendActiveBool && freeVendActiveBool->getBool() && connectorPluggedInput) {
      MO_DBG_ERR("!freeVendTrackPlugged %d", !freeVendTrackPlugged);
      MO_DBG_ERR("connectorPluggedInput() %d", connectorPluggedInput());
      MO_DBG_ERR("!transaction %d", !transaction);
  
      if (!freeVendTrackPlugged && connectorPluggedInput() && !transaction) {
          const char *idTag = freeVendIdTagString ? freeVendIdTagString->getString() : "";
          if (!idTag || *idTag == '\0') {
              idTag = "A0000000";
          }
          MO_DBG_INFO("begin FreeVend Tx using idTag %s", idTag);
          beginTransaction_authorized(idTag);
          
          if (!transaction) {
              MO_DBG_ERR("could not begin FreeVend Tx");
          }
      }
  
      freeVendTrackPlugged = connectorPluggedInput();
  }

On startup, after ocpp_initialize_full, I call ocpp_setConnectorPluggedInput_m(2, Callback_true), so I see the log [MO] info (StatusNotification.cpp:52): New status: Preparing (connectorId 2). However, each time it enters Connector::loop:

[MO] ERROR (Connector.cpp:428): !freeVendTrackPlugged 1
[MO] ERROR (Connector.cpp:429): connectorPluggedInput() 0
[MO] ERROR (Connector.cpp:430): !transaction 1
....
[MO] ERROR (Connector.cpp:428): !freeVendTrackPlugged 0
[MO] ERROR (Connector.cpp:429): connectorPluggedInput() 1
[MO] ERROR (Connector.cpp:430): !transaction 1

And so on.
The situation where !freeVendTrackPlugged = 1 and connectorPluggedInput() = 1 never occurs, so the transaction doesn’t start.

Any ideas?
Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant