[update] when acc channel = false, Current = 800mA

This commit is contained in:
Roy_01
2023-10-12 17:20:12 +08:00
parent d706fe9c3e
commit 3f416f17b3
2 changed files with 20 additions and 11 deletions
@@ -3,7 +3,7 @@
#define VERSION_DATE_YEAR 23
#define VERSION_DATE_MONTH 10
#define VERSION_DATE_DAY 2
#define VERSION_DATE_HOUR 4
#define VERSION_DATE_MINUTE 5
#define VERSION_DATE_DAY 12
#define VERSION_DATE_HOUR 17
#define VERSION_DATE_MINUTE 20
#endif
@@ -322,10 +322,10 @@ static void set_output_enable(bool *out_chan)
{
update_latch_status(E_PIN_D0_PR_0, out_chan[0]);
update_latch_status(E_PIN_DO_MOS_0, out_chan[1]);
update_latch_status(E_PIN_AO_MOS_0, out_chan[2]);
update_latch_status(E_PIN_AO_MOS_2, out_chan[3]);
update_latch_status(E_PIN_AO_MOS_3, out_chan[4]);
update_latch_status(E_PIN_AO_MOS_1, out_chan[5]);
update_latch_status(E_PIN_AO_MOS_0, 1);
update_latch_status(E_PIN_AO_MOS_2, 1);
update_latch_status(E_PIN_AO_MOS_3, 1);
update_latch_status(E_PIN_AO_MOS_1, 1);
update_latch_status(E_PIN_DO_MOS_1, out_chan[6]);
update_latch_status(E_PIN_D0_PR_1, out_chan[7]);
update_latch_status(E_PIN_5V_OUT_EN_0, out_chan[8]);
@@ -338,6 +338,19 @@ static void curr_out()
{
uint16_t AOutCode0, AOutCode1, AOutCode2, AOutCode3;
if (chan_en[PIN_A0] == false) {
instru.Trig_CurCon[0] = 50000; //50000=200mA
}
if (chan_en[PIN_A1] == false) {
instru.Trig_CurCon[1] = 50000; //50000=200mA
}
if (chan_en[PIN_A2] == false) {
instru.Trig_CurCon[2] = 50000; //50000=200mA
}
if (chan_en[PIN_A3] == false) {
instru.Trig_CurCon[3] = 50000; //50000=200mA
}
AOutCode0 = Usercode_Correction_to_Aout(Aout_CH_0, instru.Trig_CurCon[0]);
AOutCode1 = Usercode_Correction_to_Aout(Aout_CH_1, instru.Trig_CurCon[1]);
AOutCode2 = Usercode_Correction_to_Aout(Aout_CH_2, instru.Trig_CurCon[2]);
@@ -1619,10 +1632,6 @@ static void elite_reset()
//TW1508reset();
// user customize 200mA
chan_en[PIN_A0] = true;
chan_en[PIN_A1] = true;
chan_en[PIN_A2] = true;
chan_en[PIN_A3] = true;
instru.Trig_CurCon[0] = 50000; //50000=200mA
instru.Trig_CurCon[1] = 50000; //50000=200mA
instru.Trig_CurCon[2] = 50000; //50000=200mA