forked from h2zero/esp-nimble-cpp
New compiler new printf chars
This commit is contained in:
@ -243,7 +243,7 @@ bool FreeRTOS::Semaphore::take(uint32_t timeoutMs, std::string owner) {
|
|||||||
std::string FreeRTOS::Semaphore::toString() {
|
std::string FreeRTOS::Semaphore::toString() {
|
||||||
char hex[9];
|
char hex[9];
|
||||||
std::string res = "name: " + m_name + " (0x";
|
std::string res = "name: " + m_name + " (0x";
|
||||||
snprintf(hex, sizeof(hex), "%08x", (uint32_t)m_semaphore);
|
snprintf(hex, sizeof(hex), "%08lx", (uint32_t)m_semaphore);
|
||||||
res += hex;
|
res += hex;
|
||||||
res += "), owner: " + m_owner;
|
res += "), owner: " + m_owner;
|
||||||
return res;
|
return res;
|
||||||
|
@ -1034,7 +1034,7 @@ uint16_t NimBLEClient::getMTU() {
|
|||||||
NIMBLE_LOGD(LOG_TAG, "ble_sm_inject_io result: %d", rc);
|
NIMBLE_LOGD(LOG_TAG, "ble_sm_inject_io result: %d", rc);
|
||||||
|
|
||||||
} else if (event->passkey.params.action == BLE_SM_IOACT_NUMCMP) {
|
} else if (event->passkey.params.action == BLE_SM_IOACT_NUMCMP) {
|
||||||
NIMBLE_LOGD(LOG_TAG, "Passkey on device's display: %d", event->passkey.params.numcmp);
|
NIMBLE_LOGD(LOG_TAG, "Passkey on device's display: %lu", event->passkey.params.numcmp);
|
||||||
pkey.action = event->passkey.params.action;
|
pkey.action = event->passkey.params.action;
|
||||||
// Compatibility only - Do not use, should be removed the in future
|
// Compatibility only - Do not use, should be removed the in future
|
||||||
if(NimBLEDevice::m_securityCallbacks != nullptr) {
|
if(NimBLEDevice::m_securityCallbacks != nullptr) {
|
||||||
|
@ -124,30 +124,30 @@ std::string NimBLEEddystoneTLM::toString() {
|
|||||||
out += " C\n";
|
out += " C\n";
|
||||||
|
|
||||||
out += "Adv. Count ";
|
out += "Adv. Count ";
|
||||||
snprintf(val, sizeof(val), "%d", ENDIAN_CHANGE_U32(m_eddystoneData.advCount));
|
snprintf(val, sizeof(val), "%lu", ENDIAN_CHANGE_U32(m_eddystoneData.advCount));
|
||||||
out += val;
|
out += val;
|
||||||
out += "\n";
|
out += "\n";
|
||||||
|
|
||||||
out += "Time in seconds ";
|
out += "Time in seconds ";
|
||||||
snprintf(val, sizeof(val), "%d", rawsec/10);
|
snprintf(val, sizeof(val), "%lu", rawsec/10);
|
||||||
out += val;
|
out += val;
|
||||||
out += "\n";
|
out += "\n";
|
||||||
|
|
||||||
out += "Time ";
|
out += "Time ";
|
||||||
|
|
||||||
snprintf(val, sizeof(val), "%04d", rawsec / 864000);
|
snprintf(val, sizeof(val), "%04lu", rawsec / 864000);
|
||||||
out += val;
|
out += val;
|
||||||
out += ".";
|
out += ".";
|
||||||
|
|
||||||
snprintf(val, sizeof(val), "%02d", (rawsec / 36000) % 24);
|
snprintf(val, sizeof(val), "%02lu", (rawsec / 36000) % 24);
|
||||||
out += val;
|
out += val;
|
||||||
out += ":";
|
out += ":";
|
||||||
|
|
||||||
snprintf(val, sizeof(val), "%02d", (rawsec / 600) % 60);
|
snprintf(val, sizeof(val), "%02lu", (rawsec / 600) % 60);
|
||||||
out += val;
|
out += val;
|
||||||
out += ":";
|
out += ":";
|
||||||
|
|
||||||
snprintf(val, sizeof(val), "%02d", (rawsec / 10) % 60);
|
snprintf(val, sizeof(val), "%02lu", (rawsec / 10) % 60);
|
||||||
out += val;
|
out += val;
|
||||||
out += "\n";
|
out += "\n";
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ bool NimBLEScan::isScanning() {
|
|||||||
* @return True if scan started or false if there was an error.
|
* @return True if scan started or false if there was an error.
|
||||||
*/
|
*/
|
||||||
bool NimBLEScan::start(uint32_t duration, void (*scanCompleteCB)(NimBLEScanResults), bool is_continue) {
|
bool NimBLEScan::start(uint32_t duration, void (*scanCompleteCB)(NimBLEScanResults), bool is_continue) {
|
||||||
NIMBLE_LOGD(LOG_TAG, ">> start(duration=%d)", duration);
|
NIMBLE_LOGD(LOG_TAG, ">> start(duration=%lu)", duration);
|
||||||
|
|
||||||
// Save the callback to be invoked when the scan completes.
|
// Save the callback to be invoked when the scan completes.
|
||||||
m_scanCompleteCB = scanCompleteCB;
|
m_scanCompleteCB = scanCompleteCB;
|
||||||
|
@ -524,7 +524,7 @@ NimBLEConnInfo NimBLEServer::getPeerIDInfo(uint16_t id) {
|
|||||||
NIMBLE_LOGD(LOG_TAG, "BLE_SM_IOACT_DISP; ble_sm_inject_io result: %d", rc);
|
NIMBLE_LOGD(LOG_TAG, "BLE_SM_IOACT_DISP; ble_sm_inject_io result: %d", rc);
|
||||||
|
|
||||||
} else if (event->passkey.params.action == BLE_SM_IOACT_NUMCMP) {
|
} else if (event->passkey.params.action == BLE_SM_IOACT_NUMCMP) {
|
||||||
NIMBLE_LOGD(LOG_TAG, "Passkey on device's display: %d", event->passkey.params.numcmp);
|
NIMBLE_LOGD(LOG_TAG, "Passkey on device's display: %lu", event->passkey.params.numcmp);
|
||||||
pkey.action = event->passkey.params.action;
|
pkey.action = event->passkey.params.action;
|
||||||
// Compatibility only - Do not use, should be removed the in future
|
// Compatibility only - Do not use, should be removed the in future
|
||||||
if(NimBLEDevice::m_securityCallbacks != nullptr) {
|
if(NimBLEDevice::m_securityCallbacks != nullptr) {
|
||||||
|
Reference in New Issue
Block a user