@@ -118,7 +118,7 @@ def _create_and_link_attribute_pvs(pv_prefix: str, mapping: Mapping) -> None:
118118 for single_mapping in mapping .get_controller_mappings ():
119119 path = single_mapping .controller .path
120120 for attr_name , attribute in single_mapping .attributes .items ():
121- pv_name = attr_name .title (). replace ("_" , "" )
121+ pv_name = attr_name .replace ("_" , "" )
122122 _pv_prefix = ":" .join ([pv_prefix ] + path )
123123 full_pv_name_length = len (f"{ _pv_prefix } :{ pv_name } " )
124124
@@ -222,6 +222,10 @@ async def async_write_display(value: T):
222222 record = _get_output_record (
223223 f"{ pv_prefix } :{ pv_name } " , attribute , on_update = on_update
224224 )
225+ pascal_case_pv_name = pv_name .title ()
226+ if pascal_case_pv_name != pv_name :
227+ record .add_alias (f"{ pv_prefix } :{ pascal_case_pv_name } " )
228+
225229 _add_attr_pvi_info (record , pv_prefix , attr_name , "w" )
226230
227231 attribute .set_write_display_callback (async_write_display )
@@ -236,7 +240,13 @@ def _get_output_record(pv: str, attribute: AttrW, on_update: Callable) -> Any:
236240 isinstance (v , str ) for v in attribute .allowed_values
237241 )
238242 state_keys = dict (zip (MBB_STATE_FIELDS , attribute .allowed_values , strict = False ))
239- return builder .mbbOut (pv , always_update = True , on_update = on_update , ** state_keys , ** attribute_fields )
243+ return builder .mbbOut (
244+ pv ,
245+ always_update = True ,
246+ on_update = on_update ,
247+ ** state_keys ,
248+ ** attribute_fields ,
249+ )
240250
241251 match attribute .datatype :
242252 case Bool (znam , onam ):
@@ -248,11 +258,21 @@ def _get_output_record(pv: str, attribute: AttrW, on_update: Callable) -> Any:
248258 on_update = on_update ,
249259 )
250260 case Int ():
251- return builder .longOut (pv , always_update = True , on_update = on_update , ** attribute_fields )
261+ return builder .longOut (
262+ pv , always_update = True , on_update = on_update , ** attribute_fields
263+ )
252264 case Float (prec ):
253- return builder .aOut (pv , always_update = True , on_update = on_update , PREC = prec , ** attribute_fields )
265+ return builder .aOut (
266+ pv ,
267+ always_update = True ,
268+ on_update = on_update ,
269+ PREC = prec ,
270+ ** attribute_fields ,
271+ )
254272 case String ():
255- return builder .longStringOut (pv , always_update = True , on_update = on_update , ** attribute_fields )
273+ return builder .longStringOut (
274+ pv , always_update = True , on_update = on_update , ** attribute_fields
275+ )
256276 case _:
257277 raise FastCSException (
258278 f"Unsupported type { type (attribute .datatype )} : { attribute .datatype } "
0 commit comments