bug fixed in printKey()

This commit is contained in:
Klaus K Wilting 2018-03-24 10:43:48 +01:00
parent fe925f19f8
commit 05e9843bd5
2 changed files with 5 additions and 5 deletions

View File

@ -10,10 +10,10 @@
; ---> SELECT TARGET PLATFORM HERE! <---
[platformio]
env_default = heltec_wifi_lora_32
;env_default = heltec_wifi_lora_32
;env_default = ttgov1
;env_default = ttgov2
;env_default = lopy
env_default = lopy
;env_default = lopy4
[env:heltec_wifi_lora_32]
@ -91,8 +91,8 @@ lib_deps =
ESP32 BLE Arduino@>=0.4.9
build_flags =
;set log level, we need build_flag for this, otherwise we can't use ESP_LOGx in arduino framework
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
;needed for ESP32 BLE Ardunio v0.4.9
-fexceptions
-std=c++11

View File

@ -53,7 +53,7 @@ void printKey(const char * name, const uint8_t * key, uint8_t len, bool lsb) {
uint8_t start=lsb?len:0;
uint8_t end = lsb?0:len;
const uint8_t * p ;
char keystring[len+1] = "", keybyte[3];
char keystring[len+1] = "?", keybyte[3];
for (uint8_t i=0; i<len ; i++) {
p = lsb ? key+len-i-1 : key+i;
sprintf(keybyte, "%02X", * p);