Skip to content

Commit

Permalink
Use std::cout for print before console is init.
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-bennett committed Dec 10, 2024
1 parent d8c9434 commit 3e21ee2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/platform/portduino/PortduinoGlue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ void getMacAddr(uint8_t *dmac)
if (optionMac != nullptr && strlen(optionMac) > 0) {
if (strlen(optionMac) >= 12) {
MAC_from_string(optionMac, dmac);
std::cout << optionMac << std::endl;
} else {
uint32_t hwId = sscanf(optionMac, "%u", &hwId);
dmac[0] = 0x80;
Expand All @@ -98,7 +97,6 @@ void getMacAddr(uint8_t *dmac)
}
} else if (settingsStrings[mac_address].length() > 11) {
MAC_from_string(settingsStrings[mac_address], dmac);
std::cout << settingsStrings[mac_address] << std::endl;
exit;
} else {

Expand Down Expand Up @@ -210,7 +208,7 @@ void portduinoSetup()
std::cout << "Please set a MAC Address in config.yaml using either MACAddress or MACAddressSource." << std::endl;
exit(EXIT_FAILURE);
}
printBytes("MAC Address: ", dmac, 6);
std::cout << "MAC Address: " << std::hex << +dmac[0] << +dmac[1] << +dmac[2] << +dmac[3] << +dmac[4] << +dmac[5] << std::endl;
// Rather important to set this, if not running simulated.
randomSeed(time(NULL));

Expand Down

0 comments on commit 3e21ee2

Please sign in to comment.