问题描述
通过参阅
我遵循解决方案的一部分( - 4步骤2)解决问题。一切正常,今天校验再次失败(消息没有被验证的服务器)。
I solve the issue by following only part of the solution (steps 2 - 4). Everything worked fine and today the checksum failed again(message not verified by server).
所以我想,我没有申报的无符号字节数组(如步骤1),并导致Arduino的随机挑来使用符号/无符号字节数组。
So I guess that I did not declared the unsigned byte array (as in step 1), and cause Arduino to randomly pick to use signed/unsigned byte array.
不过,声明无符号字节数组像这样
However, declaring unsigned byte array like this
无符号字节MSGpack [187] = {
0×00};
提示错误的Arduino,指出
prompts error in Arduino, stating
错误:'MSGpack没有在这个范围内声明
在功能无效injectByte(浮动,INT)
In function 'void injectByte(float, int)':
错误:'MSGpack没有在这个范围内声明
error: 'MSGpack' was not declared in this scope
我应该如何申报的Arduino一个无符号字节数组?谢谢!
How should I declare a unsigned byte array in Arduino? Thanks!
推荐答案
尝试 uint8_t有
:
uint8_t MSGpack[187] = {0};
这篇关于Arduino的声明一个无符号字节数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!