Skip to content

Commit

Permalink
Make sure enable pin is configured for capes that support FalconV5 re…
Browse files Browse the repository at this point in the history
…ceivers
  • Loading branch information
dkulp committed Apr 3, 2024
1 parent 35bb00a commit 4338826
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/non-gpl/BBShiftString/BBShiftString.cpp
Expand Up @@ -312,6 +312,12 @@ int BBShiftStringOutput::Init(Json::Value config) {
m_pru1.channelData = (uint8_t*)calloc(1, m_pru1.frameSize);
m_pru1.formattedData = (uint8_t*)calloc(1, m_pru1.frameSize);

bool supportsV5Listeners = root.isMember("falconV5ListenerConfig");
if (supportsV5Listeners) {
// if the cape supports v5 listeners, the enable pin needs to be
// configured or data won't be sent on port1 of each receiver
PinCapabilities::getPinByName("P8-27").configPin("pruout");
}
if (hasV5SR) {
setupFalconV5Support(root, m_pru1.lastData + offset);
}
Expand Down Expand Up @@ -842,7 +848,6 @@ void BBShiftStringOutput::setupFalconV5Support(const Json::Value& root, uint8_t*
falconV5Support = new FalconV5Support();
bool supportsV5Listeners = root.isMember("falconV5ListenerConfig");
if (supportsV5Listeners) {
PinCapabilities::getPinByName("P8-27").configPin("pruout");
falconV5Support->addListeners(root["falconV5ListenerConfig"]);
}

Expand Down

0 comments on commit 4338826

Please sign in to comment.