You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
536 lines
14 KiB
536 lines
14 KiB
////////////////////////////////////////////////////////////////////////////
|
|
///@copyright Copyright (c) 2018, 传控科技 All rights reserved.
|
|
///-------------------------------------------------------------------------
|
|
/// @file bsp_drv.c
|
|
/// @brief bsp @ driver config
|
|
///-------------------------------------------------------------------------
|
|
/// @version 1.0
|
|
/// @author CC
|
|
/// @date 20180331
|
|
/// @note cc_AS_stc02
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include "app_weight.h"
|
|
#include "app_config.h"
|
|
#include "debug_drv.h"
|
|
|
|
TS_TASK_weight_ tst_weight;
|
|
#define D_task_WEIGHT_add 12
|
|
#define D_task_WEIGHT_CAL 13
|
|
#define D_task_WEIGHT_get 14
|
|
#define D_task_WEIGHT_zero 15
|
|
///#define D_task_WEIGHT_CAL 124
|
|
|
|
#define D_task_WEIGHT_out 45
|
|
#define D_task_WEIGHT_Sline 11
|
|
#define D_task_WEIGHT_getADC 22
|
|
///#define D_task_WEIGHT_CAL 33
|
|
////#define D_task_WEIGHT_Sline
|
|
|
|
|
|
|
|
void L2_task_weight_init(u8 openclose)
|
|
{
|
|
if(openclose)
|
|
{
|
|
|
|
}else
|
|
{
|
|
|
|
|
|
|
|
}
|
|
L2_task_adc_SAinit(0,&R.sd.ADC_shiftaverage_a,&R.sd.ADC_shiftaverage_b);
|
|
L2_task_adc_SAinit(1,&R.sd.ADC_shiftaverage_a,&R.sd.ADC_shiftaverage_b);
|
|
L2_task_adc_SAinit(2,&R.sd.ADC_shiftaverage_a,&R.sd.ADC_shiftaverage_b);
|
|
L2_task_adc_SAinit(3,&R.sd.ADC_shiftaverage_a,&R.sd.ADC_shiftaverage_b);
|
|
|
|
|
|
|
|
ts_adc_samples[0].zeroout = R.sd.zeroout;
|
|
ts_adc_samples[1].zeroout = R.sd.zeroout;
|
|
ts_adc_samples[2].zeroout = R.sd.zeroout;
|
|
ts_adc_samples[3].zeroout = R.sd.zeroout;
|
|
|
|
ts_adc_samples[0].offset = R.sd.sensor[0];
|
|
ts_adc_samples[1].offset = R.sd.sensor[1];
|
|
ts_adc_samples[2].offset = R.sd.sensor[2];
|
|
ts_adc_samples[3].offset = R.sd.sensor[3];
|
|
|
|
L0_waitFree_uartN(0);
|
|
printf("\r\n\L2_task_weight_initr\n");
|
|
|
|
printf("\r\n\R.sd.zeroout= %d = 0x%4x offset %d = 0x%4x\r\n", R.sd.zeroout, R.sd.zeroout,ts_adc_samples[0].offset,ts_adc_samples[0].offset);
|
|
printf("\r\nR.sd.zeroout= %d = 0x%4x offset %d = 0x%4x\r\n", R.sd.zeroout, R.sd.zeroout,ts_adc_samples[1].offset,ts_adc_samples[1].offset);
|
|
printf("\r\nR.sd.zeroout= %d = 0x%4x offset %d = 0x%4x\r\n", R.sd.zeroout, R.sd.zeroout,ts_adc_samples[2].offset,ts_adc_samples[2].offset);
|
|
printf("\r\nR.sd.zeroout= %d = 0x%4x offset %d = 0x%4x\r\n", R.sd.zeroout, R.sd.zeroout,ts_adc_samples[3].offset,ts_adc_samples[3].offset);
|
|
|
|
}
|
|
|
|
void L3_task_weight_init(void)
|
|
{
|
|
//显示任务初始化
|
|
L1_task_init(&tst_weight.task);
|
|
L3_task_s_go(tst_weight,D_task_init);
|
|
L2_task_weight_init(0);
|
|
}
|
|
|
|
#define D_debug_ch D_Wch2
|
|
void L3_task_weight_handler6666(TS_TASK_weight_ *s)
|
|
{
|
|
|
|
L2_task_adc_sample(&ts_adc_samples[D_Wch1]);
|
|
|
|
//////// /// L2_task_adc_sample(&ts_adc_samples[D_Wch2]);
|
|
L2_task_adc_sample(&ts_adc_samples[D_Wch3]);
|
|
L2_task_adc_sample(&ts_adc_samples[D_Wch4]);
|
|
|
|
L2_task_adc_sample(&ts_adc_samples[D_debug_ch]);
|
|
|
|
if(1 == ts_adc_samples[D_debug_ch].ok)
|
|
{
|
|
ts_adc_samples[D_debug_ch].ok = 0;
|
|
|
|
L0_uart0_ulhex(ts_adc_samples[D_debug_ch].out0);L0_uart0_uc(' ');
|
|
L0_uart0_ushex(ts_adc_samples[D_debug_ch].out1a );L0_uart0_uc(' ');
|
|
L0_uart0_ushex(ts_adc_samples[D_debug_ch].out1);L0_uart0_uc(' ');
|
|
|
|
L0_uart0_0d0a();
|
|
}
|
|
}
|
|
void L3_task_weight_handler777(TS_TASK_weight_ *s)
|
|
{
|
|
L2_task_adc_sample(&ts_adc_samples[D_Wch1]);
|
|
|
|
L2_task_adc_sample(&ts_adc_samples[D_Wch2]);
|
|
L2_task_adc_sample(&ts_adc_samples[D_Wch3]);
|
|
L2_task_adc_sample(&ts_adc_samples[D_Wch4]);
|
|
|
|
if(1 == ts_adc_samples[D_debug_ch].ok)
|
|
{
|
|
ts_adc_samples[D_debug_ch].ok = 0;
|
|
/*
|
|
L0_uart0_ulhex(ts_adc_samples[D_Wch1].out0);L0_uart0_uc(' ');
|
|
L0_uart0_ulhex(ts_adc_samples[D_Wch2].out0);L0_uart0_uc(' ');
|
|
L0_uart0_ulhex(ts_adc_samples[D_Wch3].out0);L0_uart0_uc(' ');
|
|
L0_uart0_ulhex(ts_adc_samples[D_Wch4].out0);L0_uart0_uc(' ');
|
|
|
|
L0_uart0_ushex(ts_adc_samples[D_Wch1].out1a );L0_uart0_uc(' ');
|
|
L0_uart0_ushex(ts_adc_samples[D_Wch2].out1a );L0_uart0_uc(' ');
|
|
L0_uart0_ushex(ts_adc_samples[D_Wch3].out1a );L0_uart0_uc(' ');
|
|
L0_uart0_ushex(ts_adc_samples[D_Wch4].out1a );///L0_uart0_uc(' ');
|
|
|
|
|
|
L0_uart0_0d0a();
|
|
****/
|
|
}
|
|
}
|
|
|
|
///L3_task_weight_handler(&tst_weight);
|
|
void L3_task_weight_handler(TS_TASK_weight_ *s)
|
|
{
|
|
L2_task_adc_sample(&ts_adc_samples[D_Wch1]);
|
|
|
|
L2_task_adc_sample(&ts_adc_samples[D_Wch2]);
|
|
L2_task_adc_sample(&ts_adc_samples[D_Wch3]);
|
|
L2_task_adc_sample(&ts_adc_samples[D_Wch4]);
|
|
|
|
TTSS_Task_init():
|
|
L0_waitFree_uartN(0);
|
|
printf("\r\nR.sd.zeroout= %d = 0x%4x offset %d = 0x%4x", R.sd.zeroout, R.sd.zeroout,ts_adc_samples[0].offset,ts_adc_samples[0].offset);
|
|
printf("\r\nR.sd.zeroout= %d = 0x%4x offset %d = 0x%4x", R.sd.zeroout, R.sd.zeroout,ts_adc_samples[1].offset,ts_adc_samples[1].offset);
|
|
printf("\r\nR.sd.zeroout= %d = 0x%4x offset %d = 0x%4x", R.sd.zeroout, R.sd.zeroout,ts_adc_samples[2].offset,ts_adc_samples[2].offset);
|
|
printf("\r\nR.sd.zeroout= %d = 0x%4x offset %d = 0x%4x", R.sd.zeroout, R.sd.zeroout,ts_adc_samples[3].offset,ts_adc_samples[3].offset);
|
|
|
|
L0_uart0_uc('4');
|
|
s->slow = 0;
|
|
s->zero = 0;
|
|
|
|
L2_task_go(D_task_WEIGHT_get);
|
|
TTSS_Task_step(D_task_WEIGHT_get):
|
|
if(1 == ts_adc_samples[D_Wch4].ok)
|
|
{//
|
|
ts_adc_samples[0].ok = 0;
|
|
ts_adc_samples[1].ok = 0;
|
|
ts_adc_samples[2].ok = 0;
|
|
ts_adc_samples[3].ok = 0;
|
|
s->slow ++;
|
|
// L0_uart0_uc('%');
|
|
L2_task_go(D_task_WEIGHT_Sline);
|
|
}
|
|
TTSS_Task_step(D_task_WEIGHT_Sline):
|
|
if (s->slow >= 1)////采样减速
|
|
{s->slow = 0;
|
|
///调用asp——adc中的输出 out3
|
|
/************/
|
|
ts_adc_samples[0].out5 = ts_adc_samples[0].ts_SAb.out4;
|
|
ts_adc_samples[1].out5 = ts_adc_samples[1].ts_SAb.out4;
|
|
ts_adc_samples[2].out5 = ts_adc_samples[2].ts_SAb.out4;
|
|
ts_adc_samples[3].out5 = ts_adc_samples[3].ts_SAb.out4;
|
|
|
|
L2_task_go(D_task_WEIGHT_getADC);
|
|
}else
|
|
{
|
|
L2_task_go(D_task_WEIGHT_get);
|
|
}
|
|
//L2_task_go(D_task_WEIGHT_getADC);
|
|
TTSS_Task_step(D_task_WEIGHT_getADC):
|
|
////四个传感器相加后平均
|
|
tst_weight.sum32 = ts_adc_samples[0].out5;
|
|
tst_weight.sum32 += ts_adc_samples[1].out5;
|
|
tst_weight.sum32 += ts_adc_samples[2].out5;
|
|
tst_weight.sum32 += ts_adc_samples[3].out5;
|
|
|
|
|
|
tst_weight.sum32b = ts_adc_samples[0].out1a;
|
|
tst_weight.sum32b += ts_adc_samples[1].out1a;
|
|
tst_weight.sum32b += ts_adc_samples[2].out1a;
|
|
tst_weight.sum32b += ts_adc_samples[3].out1a;
|
|
|
|
|
|
|
|
tst_weight.out6 = tst_weight.sum32 >>2;
|
|
|
|
L0_uart0_ushex((vU16)tst_weight.adc32); L0_uart0_uc(' ');
|
|
L2_task_go(D_task_WEIGHT_CAL);
|
|
TTSS_Task_step(D_task_WEIGHT_CAL):
|
|
|
|
tst_weight.adc32 = tst_weight.out6;
|
|
L3_task_weight_cal();
|
|
/// L0_uart0_ushex(tst_weight.woutx10);
|
|
|
|
#if 0
|
|
L0_uart0_ulhex(ts_adc_samples[0].out1a);L0_uart0_uc(' ');
|
|
L0_uart0_ulhex(ts_adc_samples[1].out1a);L0_uart0_uc(' ');
|
|
L0_uart0_ulhex(ts_adc_samples[2].out1a);L0_uart0_uc(' ');
|
|
L0_uart0_ulhex(ts_adc_samples[3].out1a);L0_uart0_uc(' ');
|
|
|
|
|
|
#else
|
|
L0_uart0_ushex(ts_adc_samples[0].out1);L0_uart0_uc(' ');
|
|
L0_uart0_ushex(ts_adc_samples[1].out1);L0_uart0_uc(' ');
|
|
L0_uart0_ushex(ts_adc_samples[2].out1);L0_uart0_uc(' ');
|
|
L0_uart0_ushex(ts_adc_samples[3].out1);L0_uart0_uc(' ');
|
|
|
|
L0_uart0_ushex(ts_adc_samples[0].out2);L0_uart0_uc(' ');
|
|
L0_uart0_ushex(ts_adc_samples[1].out2);L0_uart0_uc(' ');
|
|
L0_uart0_ushex(ts_adc_samples[2].out2);L0_uart0_uc(' ');
|
|
L0_uart0_ushex(ts_adc_samples[3].out2);L0_uart0_uc(' ');
|
|
|
|
/// L0_uart0_ushex(tst_weight.woutx10);L0_uart0_uc(' ');
|
|
|
|
|
|
#endif
|
|
L0_waitFree_uartN(0);///混搭使用printf的时候必须加上
|
|
|
|
//// printf("\r\ntst_weight.t32a\r\n %d kg = 0x%4x\r\n", (vU16)tst_weight.t32a,(vU16)tst_weight.t32a);
|
|
printf(" (%d)0x%4x\r\n", tst_weight.woutx10,tst_weight.woutx10);
|
|
|
|
/// L0_uart0_0d0a();
|
|
L2_task_go(D_task_WEIGHT_out);
|
|
TTSS_Task_step(D_task_WEIGHT_out):
|
|
|
|
L2_task_go(D_task_WEIGHT_get);
|
|
TTSS_Task_step(D_task_WEIGHT_zero):
|
|
|
|
|
|
L2_task_go(D_task_WEIGHT_get);
|
|
TTSS_Task_end();
|
|
}
|
|
|
|
|
|
void L3_task_weight_cal(void)
|
|
{
|
|
if(tst_weight.adc32 <= (vU32)R.sd.zerows[1].adc)
|
|
{
|
|
if(tst_weight.adc32 <= (vU32)R.sd.zerows[0].adc )
|
|
{
|
|
tst_weight.adc32 = (vU32)R.sd.zerows[0].adc;
|
|
}
|
|
///0-0-40KG
|
|
tst_weight.t32a = (tst_weight.adc32-(vU32)R.sd.zerows[0].adc);////有可能<0
|
|
tst_weight.t32b = (vU32)(R.sd.zerows[1].adc-R.sd.zerows[0].adc);
|
|
tst_weight.t32a *= (vU32)(R.sd.zerows[1].kg - R.sd.zerows[0].kg);
|
|
tst_weight.t32a /= tst_weight.t32b;
|
|
|
|
}else
|
|
{ ///40KG 80KG
|
|
tst_weight.t32a = (vU32)(tst_weight.adc32-R.sd.zerows[1].adc);////有可能大于b
|
|
tst_weight.t32b = (vU32)(R.sd.zerows[2].adc-R.sd.zerows[1].adc);
|
|
tst_weight.t32a *= (vU32)(R.sd.zerows[2].kg-R.sd.zerows[1].kg) ;
|
|
tst_weight.t32a /= tst_weight.t32b;
|
|
tst_weight.t32a += (vU32)R.sd.zerows[1].kg;
|
|
|
|
}
|
|
tst_weight.woutx10 = (vU16)tst_weight.t32a;
|
|
}
|
|
void L3_adc_zero(void)
|
|
{
|
|
L3_out_zero(0);
|
|
L3_out_zero(1);
|
|
L3_out_zero(2);
|
|
L3_out_zero(3);
|
|
|
|
// printf("\r\niapData.zeroout= %d = 0x%4x\r\n", iapData.zeroout, iapData.zeroout);
|
|
// printf("\r\nR.sd.zeroout= %d = 0x%4x offset %d = 0x%4x\r\n", R.sd.zeroout, R.sd.zeroout,ts_adc_samples[0].offset,ts_adc_samples[0].offset);
|
|
|
|
R.sd.sensor[0] = ts_adc_samples[0].offset;
|
|
R.sd.sensor[1] = ts_adc_samples[1].offset;
|
|
R.sd.sensor[2] = ts_adc_samples[2].offset;
|
|
R.sd.sensor[3] = ts_adc_samples[3].offset;
|
|
|
|
iapData.sensor[0] = R.sd.sensor[0];
|
|
iapData.sensor[1] = R.sd.sensor[1];
|
|
iapData.sensor[2] = R.sd.sensor[2];
|
|
iapData.sensor[3] = R.sd.sensor[3];
|
|
L0_waitFree_uartN(0);
|
|
printf("\r\nR.sd.sensor 0x%4x,0x%4x,0x%4x,0x%4x,\r\n",R.sd.sensor[0],R.sd.sensor[1],R.sd.sensor[2],R.sd.sensor[3]);
|
|
|
|
L4_reg_2_iap();///写入iap
|
|
L4_iap_2_reg();///读取出来验证
|
|
}
|
|
|
|
#if 0
|
|
void L3_task_weight_set(Ts_uart_rev_ *ph4)
|
|
{
|
|
TS_P_debug *td;
|
|
if(ph4->debugok)
|
|
{ ph4->debugok = 0;
|
|
td = (TS_P_debug *)ph4->buf;
|
|
|
|
/// TS_PH4_modbus *ts_modbus = (TS_PH4_modbus *)ph4->buf;
|
|
|
|
L0_uartN_uchexArray(0,ph4->buf, 8);
|
|
if(0xfd == td->filter)
|
|
{
|
|
if(0x04 == td->R1)///设置四个传感器的清零
|
|
{ //// fd 04 33 44 55
|
|
L0_uart0_sendstr("\r\n 4sensor zero \r\n");
|
|
L3_adc_zero();
|
|
}else if(0x01 == td->R1)///设置重量的清零
|
|
{ //// fd 04 33 44 55
|
|
L0_uart0_sendstr("\r\n--weight zero-- \r\na b= ");
|
|
|
|
}else if(0x02 == td->R1)///读取
|
|
{
|
|
if(0x00 == td->R2)
|
|
{//// fd 02 00 44 55
|
|
L0_uart0_sendstr("\r\n--read iapData-- \r\n");
|
|
L4_print_iap(&iapData);
|
|
}else
|
|
{//// fd 02 33 44 55
|
|
L0_uart0_sendstr("\r\n--read R.sd-- \r\n");
|
|
L4_print_iap(&R.sd);
|
|
}
|
|
}
|
|
|
|
else
|
|
{
|
|
L0_uart0_sendstr("\r\n command error \r\n");
|
|
|
|
}
|
|
}
|
|
else if(0xf5 == td->filter)
|
|
{///设置重量
|
|
if(td->R1 < 3)///
|
|
{
|
|
//// R1 R2 R3
|
|
//// f5 00 33 44 55 把当前的adc的值作为第R1个校准点的值
|
|
R.sd.zerows[td->R1].adc = (vU16)tst_weight.out6;
|
|
|
|
Lc_buf_copy_uc((u8 *)&R.sd.factory_ws,(u8 *)&R.sd.zerows,12);
|
|
L4_reg_2_iap();///写入iap
|
|
L4_iap_2_reg();///读取出来验证
|
|
}else
|
|
{
|
|
|
|
}
|
|
L0_waitFree_uartN(0);
|
|
printf("\r\n set[ %d].adc = 0x%04x\r\n",(int)td->R1, (vU16)tst_weight.out6);
|
|
}
|
|
|
|
|
|
else if(0xf6 == td->filter)
|
|
{///设置砝码
|
|
if(td->R1 < 3)///
|
|
{
|
|
//// R1 R2 R3
|
|
//// f5 00 33 44 55 把当前第R1个校准曲线的点的kg的值 0x3344
|
|
R.sd.zerows[td->R1].kg = D_2uc_u16(R2,R3);
|
|
|
|
Lc_buf_copy_uc((u8 *)&R.sd.factory_ws,(u8 *)&R.sd.zerows,12);
|
|
L4_reg_2_iap();///写入iap
|
|
L4_iap_2_reg();///读取出来验证
|
|
}else
|
|
{
|
|
|
|
}
|
|
L0_waitFree_uartN(0);
|
|
printf("\r\nset [ %d],Kg = 0x%04x\r\n",(int)td->R1, R.sd.zerows[td->R1].kg );
|
|
}
|
|
|
|
|
|
else
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
void L3_weight_setPara(u8 filter)
|
|
{
|
|
|
|
|
|
|
|
if(filter == Ts_debug.td->filter)
|
|
{
|
|
L0_uart0_uc("A");
|
|
L0_uart0_0d0a();
|
|
|
|
|
|
if(0x01 == Ts_debug.td->ocr)
|
|
{
|
|
if(0x04 == Ts_debug.td->R1)///设置四个传感器的清零
|
|
{ //// fd 04 33 44 01
|
|
L0_uart0_sendstr("\r\n 4sensor zero \r\n");
|
|
L3_adc_zero();
|
|
}else if(0x01 == Ts_debug.td->R1)///设置重量的清零
|
|
{ //// fd 01 33 44 01
|
|
L0_uart0_sendstr("\r\n--weight zero-- \r\na b= ");
|
|
|
|
}else if(0x02 == Ts_debug.td->R1)///读取
|
|
{
|
|
if(0x00 == Ts_debug.td->R2)
|
|
{//// fd 02 00 44 01
|
|
L0_uart0_sendstr("\r\n--read iapData-- \r\n");
|
|
L4_print_iap(&iapData);
|
|
}else
|
|
{//// fd 02 33 44 01
|
|
L0_uart0_sendstr("\r\n--read R.sd-- \r\n");
|
|
L4_print_iap(&R.sd);
|
|
}
|
|
}
|
|
|
|
else
|
|
{
|
|
L0_uart0_sendstr("\r\n command error \r\n");
|
|
|
|
}
|
|
}
|
|
else if(0x02 == Ts_debug.td->ocr)
|
|
{///设置重量
|
|
if(Ts_debug.td->R1 < 3)///
|
|
{
|
|
//// R1 R2 R3
|
|
//// fd 00 33 44 02 把当前的adc的值作为第R1个校准点的值
|
|
R.sd.zerows[Ts_debug.td->R1].adc = (vU16)tst_weight.out6;
|
|
|
|
Lc_buf_copy_uc((u8 *)&R.sd.factory_ws,(u8 *)&R.sd.zerows,12);
|
|
L4_reg_2_iap();///写入iap
|
|
L4_iap_2_reg();///读取出来验证
|
|
}else
|
|
{
|
|
|
|
}
|
|
L0_waitFree_uartN(0);
|
|
printf("\r\n set[ %d].adc = 0x%04x\r\n",(int)Ts_debug.td->R1, (vU16)tst_weight.out6);
|
|
}
|
|
|
|
|
|
else if(0x03 == Ts_debug.td->ocr)
|
|
{///设置砝码
|
|
if(Ts_debug.td->R1 < 3)///
|
|
{ //200
|
|
//// R1 R2 R3
|
|
//// fd 00 33 44 03 把当前第R1个校准曲线的点的kg的值 0x3344
|
|
R.sd.zerows[Ts_debug.td->R1].kg = D_2uc_u16(Ts_debug.td->R2,Ts_debug.td->R3);
|
|
Lc_buf_copy_uc((u8 *)&R.sd.factory_ws,(u8 *)&R.sd.zerows,12);
|
|
L4_reg_2_iap();///写入iap
|
|
L4_iap_2_reg();///读取出来验证 20 14
|
|
}else
|
|
{
|
|
|
|
}
|
|
L0_waitFree_uartN(0);
|
|
printf("\r\nset [ %d],Kg = 0x%04x\r\n",(int)Ts_debug.td->R1, R.sd.zerows[Ts_debug.td->R1].kg );
|
|
}
|
|
|
|
|
|
else
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
#ifdef doc4324
|
|
|
|
--print_reg--
|
|
a b= 02 05
|
|
factory_ws
|
|
0 kg = 0x1235
|
|
200 kg = 0x5678
|
|
400 kg = 0x789a
|
|
|
|
zerows
|
|
0 kg = 0x1234
|
|
200 kg = 0x5678
|
|
400 kg = 0x789b
|
|
|
|
s->zeroout= 8049 = 0x1f71
|
|
|
|
s->sensor 0x2198 0x2b58 0x ad3 0x21e6
|
|
|
|
--read --
|
|
--print_reg--
|
|
a b= 02 05
|
|
factory_ws
|
|
0 kg = 0x1235
|
|
200 kg = 0x5678
|
|
400 kg = 0x789a
|
|
|
|
zerows
|
|
0 kg = 0x1234
|
|
200 kg = 0x5678
|
|
400 kg = 0x789b
|
|
|
|
s->zeroout= 8049 = 0x1f71
|
|
|
|
s->sensor 0x2198 0x2b58 0x ad3 0x21e6
|
|
|
|
--read R.sd--
|
|
|
|
|
|
|
|
iapData.sensor 0x263b 0x32ac 0x1465 0x2e99
|
|
&e2p write success2800 01 00 02 00 03 00 04 00 00 12 35 00 C8 56 78 01 90 78 9A 00 00 12 34 00 C8 56 78 01 90 78 9B 00 7B FF 85 1F 71 02 05
|
|
|
|
a b= 02 05
|
|
factory_ws
|
|
0 kg = 0x1235
|
|
200 kg = 0x5678
|
|
400 kg = 0x789a
|
|
|
|
zerows
|
|
0 kg = 0x1234
|
|
200 kg = 0x5678
|
|
400 kg = 0x789b
|
|
|
|
iapData.zeroout= 8049 = 0x1f71
|
|
|
|
R.sd.zeroout= 8049 = 0x1f71 offset 9787 = 0x263b
|
|
|
|
iapData.sensor 0x 1 0x 2 0x 3 0x 4
|
|
e2p read success
|
|
17FC 1F6A 1F4D 1F39 1D7B 0021
|
|
1F19 1F51 1F0C 1EEB 1F18 0025
|
|
1EEA 1F3A 1ECD 1EB3 1EE9 0025
|
|
1EA7 1F25 1E87 1E6F 1EB0 0024
|
|
|
|
#endif
|
|
|
|
|
|
|