小编r-d*_*ent的帖子

在鹅卵石手表上记录枚举

当我在Pebble上记录错误时,如下所示:

static void message_dropped(AppMessageResult reason, void *context) {
  APP_LOG(APP_LOG_LEVEL_DEBUG, "Message dropped. Reason: %d", reason);
}
Run Code Online (Sandbox Code Playgroud)

我只是得到错误消息的int值.是否有一种简单的方法来记录枚举的文本?喜欢:

static void message_dropped(AppMessageResult reason, void *context) {
  APP_LOG(APP_LOG_LEVEL_DEBUG, "Message dropped. Reason: %fancy", reason);
}
// Would return "APP_MSG_BUFFER_OVERFLOW"
Run Code Online (Sandbox Code Playgroud)

c debugging pebble-watch pebble-sdk

10
推荐指数
1
解决办法
2035
查看次数

标签 统计

c ×1

debugging ×1

pebble-sdk ×1

pebble-watch ×1