5,6 → 5,11 |
// + see the File "License.txt" for further Informations |
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
#include <avr/io.h> |
#include <avr/interrupt.h> |
#include <avr/wdt.h> |
|
#include "eeprom.h" |
#include "main.h" |
#include "menu.h" |
#include "timer0.h" |
336,11 → 341,11 |
if(tmp_char_arr2[0] != 0xff) |
{ |
if(tmp_char_arr2[0] > 5) tmp_char_arr2[0] = 5; |
ReadParameterSet(tmp_char_arr2[0], (uint8_t *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE); |
SendOutData('L' + tmp_char_arr2[0] -1,MeineSlaveAdresse,(uint8_t *) &EE_Parameter.Kanalbelegung[0],STRUCT_PARAM_LAENGE); |
ParamSet_ReadFromEEProm(tmp_char_arr2[0]); |
SendOutData('L' + tmp_char_arr2[0] -1,MeineSlaveAdresse,(uint8_t *) &ParamSet.Kanalbelegung[0],PARAMSET_STRUCT_LEN); |
} |
else |
SendOutData('L' + GetActiveParamSetNumber()-1,MeineSlaveAdresse,(uint8_t *) &EE_Parameter.Kanalbelegung[0],STRUCT_PARAM_LAENGE); |
SendOutData('L' + GetParamByte(PID_ACTIVE_SET)-1,MeineSlaveAdresse,(uint8_t *) &ParamSet.Kanalbelegung[0],PARAMSET_STRUCT_LEN); |
|
break; |
|
349,12 → 354,12 |
case 'n': |
case 'o': |
case 'p': // Parametersatz speichern |
Decode64((uint8_t *) &EE_Parameter.Kanalbelegung[0],STRUCT_PARAM_LAENGE,3,AnzahlEmpfangsBytes); |
WriteParameterSet(rxd_buffer[2] - 'l' + 1, (uint8_t *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE); |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ACTIVE_SET], rxd_buffer[2] - 'l' + 1); // aktiven Datensatz merken |
Umschlag180Nick = (int32_t) EE_Parameter.WinkelUmschlagNick * 2500L; |
Umschlag180Roll = (int32_t) EE_Parameter.WinkelUmschlagRoll * 2500L; |
Piep(GetActiveParamSetNumber()); |
Decode64((uint8_t *) &ParamSet.Kanalbelegung[0],PARAMSET_STRUCT_LEN,3,AnzahlEmpfangsBytes); |
ParamSet_WriteToEEProm(rxd_buffer[2] - 'l' + 1); |
//SetActiveParamSet(rxd_buffer[2] - 'l' + 1); // is alredy done in ParamSet_WriteToEEProm() |
Umschlag180Nick = (int32_t) ParamSet.WinkelUmschlagNick * 2500L; |
Umschlag180Roll = (int32_t) ParamSet.WinkelUmschlagRoll * 2500L; |
Piep(GetActiveParamSet()); |
break; |
|
|