Loading…
Loading…
Method Name: setup_wizard
Method ID: 0x4A3C
Method Label: Setup Wizard
Method Help:
- {
- char status[3];
- long select;
- long step;
- int error;
- _set_device_status(0xFF,0);
- _set_all_resp_code(0);
- _set_xmtr_device_status(0xFF,0);
- _set_xmtr_all_resp_code(0);
- _add_abort_method(19133);
- select = 0;
- step = 1;
- error = 0;
- _MenuDisplay(19134,literal_string(1730),literal_string(1736));
- do {
- switch (step)
- {
- case 1:
- send_command(13);
- send_command(20);
- send_command(12);
- send_command(169);
- tag_w = tag;
- descriptor_w = descriptor;
- date_w = date;
- save_values();
- _MenuDisplay(19135,literal_string(1730),literal_string(1736));
- send_trans(150,2,status);
- if (status[0] != 0)
- {
- display_response_status(150,status[0]);
- error = 1;
- status[0] = 0;
- }
- send(17,status);
- if (status[0] != 0)
- {
- display_response_status(17,status[0]);
- error = 1;
- status[0] = 0;
- }
- send_trans(252,0,status);
- if (status[0] != 0)
- {
- display_response_status(252,status[0]);
- error = 1;
- status[0] = 0;
- }
- send_trans(252,1,status);
- if (status[0] != 0)
- {
- display_response_status(252,status[0]);
- error = 1;
- status[0] = 0;
- }
- send(19,status);
- if (status[0] != 0)
- {
- display_response_status(19,status[0]);
- error = 1;
- status[0] = 0;
- }
- send_trans(252,2,status);
- if (status[0] != 0)
- {
- display_response_status(252,status[0]);
- error = 1;
- status[0] = 0;
- }
- send(22,status);
- if (status[0] != 0)
- {
- display_response_status(22,status[0]);
- error = 1;
- status[0] = 0;
- }
- send(170,status);
- if (status[0] != 0)
- {
- display_response_status(170,status[0]);
- error = 1;
- status[0] = 0;
- }
- send_command(13);
- send_command(20);
- if (!error)
- {
- save_values();
- step = 2;
- }
- break;
- case 2:
- _MenuDisplay(19136,literal_string(1735),literal_string(1736));
- if (select == 1)
- {
- send_trans(252,3,status);
- if (status[0] != 0)
- {
- display_response_status(252,status[0]);
- error = 1;
- status[0] = 0;
- }
- send(142,status);
- if (status[0] != 0)
- {
- display_response_status(142,status[0]);
- error = 1;
- status[0] = 0;
- }
- if (MeasType == 2)
- {
- primary_variable_code = 2;
- send_trans(252,7,status);
- }
- if (MeasType != 2 && primary_variable_code == 2)
- {
- primary_variable_code = 0;
- send_trans(252,7,status);
- }
- if (MeasType == 0 && primary_variable_code != 0)
- {
- primary_variable_code = 0;
- send_trans(252,7,status);
- }
- if (!error)
- {
- save_values();
- step = 3;
- }
- }
- else
- {
- step = 1;
- }
- break;
- case 3:
- _MenuDisplay(19137,literal_string(1735),literal_string(1736));
- if (select == 1)
- {
- send(130,status);
- if (status[0] != 0)
- {
- display_response_status(130,status[0]);
- error = 1;
- status[0] = 0;
- }
- send(144,status);
- if (status[0] != 0)
- {
- display_response_status(144,status[0]);
- error = 1;
- status[0] = 0;
- }
- send(138,status);
- if (status[0] != 0)
- {
- display_response_status(138,status[0]);
- error = 1;
- status[0] = 0;
- }
- send(194,status);
- if (status[0] != 0)
- {
- display_response_status(194,status[0]);
- error = 1;
- status[0] = 0;
- }
- if (!error)
- {
- save_values();
- step = 4;
- }
- }
- else
- {
- step = 2;
- }
- break;
- case 4:
- _MenuDisplay(19138,literal_string(1735),literal_string(1736));
- if (select == 1)
- {
- send(132,status);
- if (status[0] != 0)
- {
- display_response_status(132,status[0]);
- error = 1;
- status[0] = 0;
- }
- send(176,status);
- if (status[0] != 0)
- {
- display_response_status(176,status[0]);
- error = 1;
- status[0] = 0;
- }
- if (!error)
- {
- save_values();
- step = 5;
- }
- }
- else
- {
- step = 3;
- }
- break;
- case 5:
- _MenuDisplay(19139,literal_string(1735),literal_string(1736));
Please login for more