diff options
Diffstat (limited to 'examples/direct_bt_scanner10/dbt_scanner10.cpp')
-rw-r--r-- | examples/direct_bt_scanner10/dbt_scanner10.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/direct_bt_scanner10/dbt_scanner10.cpp b/examples/direct_bt_scanner10/dbt_scanner10.cpp index d8d87ac0..0653c4c5 100644 --- a/examples/direct_bt_scanner10/dbt_scanner10.cpp +++ b/examples/direct_bt_scanner10/dbt_scanner10.cpp @@ -132,10 +132,14 @@ class MyAdapterStatusListener : public AdapterStatusListener { void adapterSettingsChanged(DBTAdapter const &a, const AdapterSetting oldmask, const AdapterSetting newmask, const AdapterSetting changedmask, const uint64_t timestamp) override { - fprintf(stderr, "****** SETTINGS_CHANGED: %s -> %s, changed %s\n", - getAdapterSettingsString(oldmask).c_str(), - getAdapterSettingsString(newmask).c_str(), - getAdapterSettingsString(changedmask).c_str()); + const bool initialSetting = AdapterSetting::NONE == oldmask; + if( initialSetting ) { + fprintf(stderr, "****** SETTINGS_INITIAL: %s -> %s, changed %s\n", getAdapterSettingsString(oldmask).c_str(), + getAdapterSettingsString(newmask).c_str(), getAdapterSettingsString(changedmask).c_str()); + } else { + fprintf(stderr, "****** SETTINGS_CHANGED: %s -> %s, changed %s\n", getAdapterSettingsString(oldmask).c_str(), + getAdapterSettingsString(newmask).c_str(), getAdapterSettingsString(changedmask).c_str()); + } fprintf(stderr, "Status DBTAdapter:\n"); fprintf(stderr, "%s\n", a.toString().c_str()); (void)timestamp; |