File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
src/instrumentman/datatransfer Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 44 extra_command ,
55 argument ,
66 option ,
7+ IntRange ,
78 File
89)
910
@@ -59,6 +60,13 @@ def cli_download(**kwargs: Any) -> None:
5960)
6061@com_baud_option (1200 )
6162@com_timeout_option ()
63+ @option (
64+ "-s" ,
65+ "--skip" ,
66+ help = "number of header rows to skip" ,
67+ type = IntRange (min = 0 ),
68+ default = 0
69+ )
6270def cli_upload (** kwargs : Any ) -> None :
6371 """Upload ASCII data to the instrument."""
6472 from .app import main_upload
Original file line number Diff line number Diff line change @@ -50,14 +50,18 @@ def main_upload(
5050 port : str ,
5151 file : TextIOWrapper ,
5252 baud : int = 1200 ,
53- timeout : int = 15
53+ timeout : int = 15 ,
54+ skip : int = 0
5455) -> None :
5556 with open_serial (
5657 port ,
5758 speed = baud ,
5859 timeout = timeout
5960 ) as com :
6061 try :
62+ for _ in range (skip ):
63+ next (file )
64+
6165 count = 0
6266 with progressbar (
6367 file ,
You can’t perform that action at this time.
0 commit comments