@@ -52,7 +52,7 @@ def import_eds(source, node_id):
5252 else :
5353 for rate in [10 , 20 , 50 , 125 , 250 , 500 , 800 , 1000 ]:
5454 baudPossible = int (
55- eds .get ("DeviceInfo" , "Baudrate_ %i" % rate , fallback = '0' ), 0 )
55+ eds .get ("DeviceInfo" , "BaudRate_ %i" % rate , fallback = '0' ), 0 )
5656 if baudPossible != 0 :
5757 od .device_information .allowed_baudrates .add (rate * 1000 )
5858
@@ -85,7 +85,7 @@ def import_eds(source, node_id):
8585 pass
8686
8787 if eds .has_section ("DeviceComissioning" ):
88- od .bitrate = int (eds .get ("DeviceComissioning" , "Baudrate " )) * 1000
88+ od .bitrate = int (eds .get ("DeviceComissioning" , "BaudRate " )) * 1000
8989 od .node_id = int (eds .get ("DeviceComissioning" , "NodeID" ), 0 )
9090
9191 for section in eds .sections ():
@@ -370,10 +370,10 @@ def export_record(var, eds):
370370 "EdsVersion" : 4.2 ,
371371 }
372372
373- file_info .setdefault ("ModificationDate" , defmtime .strftime ("%m-%d-%Y" ))
374- file_info .setdefault ("ModificationTime" , defmtime .strftime ("%I:%m%p" ))
375- for k , v in origFileInfo .items ():
376- file_info .setdefault (k , v )
373+ file_info .setdefault ("ModificationDate" , defmtime .strftime ("%m-%d-%Y" ))
374+ file_info .setdefault ("ModificationTime" , defmtime .strftime ("%I:%m%p" ))
375+ for k , v in origFileInfo .items ():
376+ file_info .setdefault (k , v )
377377
378378 eds .add_section ("FileInfo" )
379379 for k , v in file_info .items ():
@@ -408,13 +408,13 @@ def export_record(var, eds):
408408 for rate in od .device_information .allowed_baudrates .union (
409409 {10e3 , 20e3 , 50e3 , 125e3 , 250e3 , 500e3 , 800e3 , 1000e3 }):
410410 eds .set (
411- "DeviceInfo" , "Baudrate_ %i" % (rate / 1000 ),
411+ "DeviceInfo" , "BaudRate_ %i" % (rate / 1000 ),
412412 int (rate in od .device_information .allowed_baudrates ))
413413
414414 if device_commisioning and (od .bitrate or od .node_id ):
415415 eds .add_section ("DeviceComissioning" )
416416 if od .bitrate :
417- eds .set ("DeviceComissioning" , "Baudrate " , int (od .bitrate / 1000 ))
417+ eds .set ("DeviceComissioning" , "BaudRate " , int (od .bitrate / 1000 ))
418418 if od .node_id :
419419 eds .set ("DeviceComissioning" , "NodeID" , int (od .node_id ))
420420
0 commit comments