mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-05-03 09:44:13 +02:00
Dev/ctb clocks fix (#1434)
* introduced new type Hz, typetraits, String conversions, command generation (not yet generated) * incorrect unit typo * cmd generation and compiles * default to MHz, removed space between units for consistency with timers, min and max checks for clks * in python, but need to change the default to Hz again for clean code and intuition * allow ints, doubles, implicit conversions * dont allow raw ints, doubles and implicit conversions * fixed tests * added operators for Hz in python * fix test for min clk for xilinx ctb * fix test * fix python tests * fixed xilinx period and default clks * test fix * removed the 3 clock cycle check for ctb and implemented properly the max adc clk frq for altera ctb * removing 3 clock cycle code from xilinx as well * formatting * loadpattern before 3 clk cycles code * actualtime and measurement time to be implemented in 100ns already in fw * fix tests * pyzmq dependency forthe tests * fixed pyctbgui for freq
This commit is contained in:
@@ -142,6 +142,16 @@ class CodeGenerator:
|
||||
if 'convert_to_time' in arg and arg['convert_to_time']:
|
||||
self.write_line(f'auto {arg["convert_to_time"]["output"]} = '
|
||||
f'StringTo < time::ns > ({", ".join(arg["convert_to_time"]["input"])});')
|
||||
if 'separate_freq_units' in arg and arg['separate_freq_units']:
|
||||
self.write_line(f'std::string tmp_freq({arg["separate_freq_units"]["input"]});')
|
||||
self.write_line(f'std::string {arg["separate_freq_units"]["output"][1]}'
|
||||
f' = RemoveUnit(tmp_freq);')
|
||||
self.write_line(f'auto {arg["separate_freq_units"]["output"][0]} = '
|
||||
f'StringTo < defs::Hz > (tmp_freq,'
|
||||
f' {arg["separate_freq_units"]["output"][1]});')
|
||||
if 'convert_to_freq' in arg and arg['convert_to_freq']:
|
||||
self.write_line(f'auto {arg["convert_to_freq"]["output"]} = '
|
||||
f'StringTo < defs::Hz > ({", ".join(arg["convert_to_freq"]["input"])});')
|
||||
input_arguments = []
|
||||
if 'exceptions' in arg:
|
||||
for exception in arg['exceptions']:
|
||||
|
||||
Reference in New Issue
Block a user