简体   繁体   English

如何将“配置”页面中的值接收到C Pebble代码?

[英]How do I recieve values from Config page to my C Pebble code?

I have been following the Pebble Clay Config process but am stuck. 我一直在关注Pebble Clay Config的过程,但是被卡住了。 I want to be able to chnage temp value from C to F, I have the code to do this but whenever I send the information from the clay config page back to pebble it does not seem to be able to read it? 我希望能够将温度值从C转换为F,我有执行此操作的代码,但是每当我从clay config页面将信息发送回pebble时,它似乎都无法读取? I keep getting an appfault error. 我不断遇到断层错误。 That's all it says. 仅此而已。

Also it uses Clay Configuration 它还使用粘土配置

Link to the whole code is here . 链接到整个代码在这里

I hope you have seen the comprehensive pebble/clay help pages. 我希望您已经看到了全面的鹅卵石/粘土帮助页面。

You should also add the message keys you specified in config.js in SETTINGS -> PEBBLEKIT JS MESSAGE KEYS in CloudPebble. 您还应该在CloudPebble的SETTINGS- > PEBBLEKIT JS MESSAGE KEYS中添加在config.js中指定的消息密钥。

You can then read the key values in C code from the message you receive using the identifier MESSAGE_KEY_TempCond . 然后,您可以使用标识符MESSAGE_KEY_TempCond从收到的消息中读取C代码中的键值。

There are many simple examples of this on GitHub . GitHub上有许多简单的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM