added tec modulation
This commit is contained in:
@ -106,6 +106,10 @@ static void profile_repository_reset_profile(profile_t *profile)
|
||||
profile->waveform.sample_count = AD9102_SRAM_DEFAULT_SAMPLE_COUNT;
|
||||
profile->waveform.hold_cycles = AD9102_SRAM_DEFAULT_HOLD;
|
||||
profile->waveform.amplitude = AD9102_SRAM_DEFAULT_AMPLITUDE;
|
||||
profile->tec_modulation.enabled = 0u;
|
||||
profile->tec_modulation.channel_index = 0u;
|
||||
profile->tec_modulation.frequency_hz = 1000u;
|
||||
profile->tec_modulation.amplitude_code = 0u;
|
||||
profile->ds1809.apply_position = false;
|
||||
}
|
||||
|
||||
@ -299,6 +303,34 @@ static void profile_repository_apply_key_value(profile_t *profile, const char *k
|
||||
{
|
||||
profile->stm32_dac.code = profile_repository_parse_u16(value);
|
||||
}
|
||||
else if (strcmp(key, "tec_modulation_enable") == 0)
|
||||
{
|
||||
profile->tec_modulation.enabled = (uint8_t)profile_repository_parse_u16(value);
|
||||
}
|
||||
else if (strcmp(key, "tec_modulation_laser") == 0)
|
||||
{
|
||||
uint16_t laser = profile_repository_parse_u16(value);
|
||||
if (laser == 1u)
|
||||
{
|
||||
profile->tec_modulation.channel_index = 0u;
|
||||
}
|
||||
else if (laser == 2u)
|
||||
{
|
||||
profile->tec_modulation.channel_index = 1u;
|
||||
}
|
||||
else
|
||||
{
|
||||
profile->tec_modulation.channel_index = 0xFFu;
|
||||
}
|
||||
}
|
||||
else if (strcmp(key, "tec_modulation_frequency_hz") == 0)
|
||||
{
|
||||
profile->tec_modulation.frequency_hz = profile_repository_parse_u16(value);
|
||||
}
|
||||
else if (strcmp(key, "tec_modulation_amplitude_code") == 0)
|
||||
{
|
||||
profile->tec_modulation.amplitude_code = profile_repository_parse_u16(value);
|
||||
}
|
||||
else if (strcmp(key, "ds1809_apply") == 0)
|
||||
{
|
||||
if (profile_repository_parse_bool(value, &bool_value))
|
||||
|
||||
Reference in New Issue
Block a user