|
@@ -24,8 +24,7 @@ static signed long WeightConst_Weight_displayW; //
|
|
static signed long WeightConst_Weight_displayCurW; //显示重量
|
|
static signed long WeightConst_Weight_displayCurW; //显示重量
|
|
unsigned char WeightConst_displayTotal = 0; //0差重,1实重
|
|
unsigned char WeightConst_displayTotal = 0; //0差重,1实重
|
|
unsigned char WeightConst_remoteDisplay = 0;
|
|
unsigned char WeightConst_remoteDisplay = 0;
|
|
-unsigned char RemoteSendDisplay = 1;
|
|
|
|
-extern unsigned char iscowweight;
|
|
|
|
|
|
+unsigned char RemoteSendDisplay = 1;extern unsigned char iscowweight;
|
|
extern unsigned char remote_sumweight;
|
|
extern unsigned char remote_sumweight;
|
|
const uint8_t MenuItemList[12][8] = {{0xC9,0xE8,0xB1,0xB8,0xB5,0xD8,0xD6,0xB7}, //设备地址
|
|
const uint8_t MenuItemList[12][8] = {{0xC9,0xE8,0xB1,0xB8,0xB5,0xD8,0xD6,0xB7}, //设备地址
|
|
{0xCC,0xE1,0xC8,0xA1,0xB7,0xBD,0xCA,0xBD}, //提取方式
|
|
{0xCC,0xE1,0xC8,0xA1,0xB7,0xBD,0xCA,0xBD}, //提取方式
|
|
@@ -648,9 +647,15 @@ static void sendRemote(void *parameter)
|
|
void ChancheShow(void) {
|
|
void ChancheShow(void) {
|
|
uart4_send_data[0] = 0x7E;
|
|
uart4_send_data[0] = 0x7E;
|
|
uart4_send_data[1] = 0x45;
|
|
uart4_send_data[1] = 0x45;
|
|
- uart4_send_data[2] = XbeeConst_RemoteAddress + '0';
|
|
|
|
|
|
+ if (XbeeConst_RemoteAddress>9) {
|
|
|
|
+ uart4_send_data[2] = 1 + '0';
|
|
|
|
+ uart4_send_data[3] = XbeeConst_RemoteAddress%10 + '0';
|
|
|
|
+ }else{
|
|
|
|
+ uart4_send_data[2] = XbeeConst_RemoteAddress + '0';
|
|
|
|
+ uart4_send_data[3] = 0x20;
|
|
|
|
+ }
|
|
|
|
|
|
- for (int i = 3; i < 18; i++) //将缓冲区发出
|
|
|
|
|
|
+ for (int i = 4; i < 18; i++) //将缓冲区发出
|
|
uart4_send_data[i] = 0x20;
|
|
uart4_send_data[i] = 0x20;
|
|
|
|
|
|
rt_sem_take(uart4_lock, RT_WAITING_FOREVER);
|
|
rt_sem_take(uart4_lock, RT_WAITING_FOREVER);
|