Hello,
I just updated a user_code.cpp based on hello_world_guide_5 to compile with v0.13.1 and am looking for feedback on my approach.
Issue 1) contents of bm_network.h moved to spotter.h and renamed slightly
Solution:
- replace
#include “bm_network.h”with#include “spotter.h” - replace
BM_NETWORK_TYPE_CELLULAR_IRI_FALLBACKwithBmNetworkTypeCellularIriFallback
Issue 2) pubsub changes
Solution:
- replace
#include “bm_pubsub.h”with#include “pubsub.h”
Issue 3) deprecation of various bm_printf() - style functions in favor of spotter_log()
Solution:
- remove
#include “bm_printf.h”include - change
bm_fprintf()calls tospotter_log(), add the parameterUSE_TIMESTAMPbetween the filename and text string - change
bm_printf()calls tospotter_log_console()
Issue 4) proper format strings for variables
Solution:
- change some
%dformats to%luor%uas appropriate
What else might go into adapting a user_code.cpp to v0.13.1 or v0.13.2?
Thanks