SETIatHCRO / ATA-Utils

3 stars 8 forks source link

make set_atten() function fall back to REST API #10

Open wfarah opened 3 years ago

wfarah commented 3 years ago

set_atten() function: https://github.com/SETIatHCRO/ATA-Utils/blob/master/pythonLibs/ATATools/ata_control.py#L970 currently uses an ssh call to an if-switch that doesn't exist anymore. It should fall back to the REST server as per: http://restgw.hcro.org:12345/antenna/help/pams

Also, to follow the naming scheme, I think it's probably better to name this function set_pams() (as get_pams() already exists). We can potentially keep set_atten() for backward compatibility.

wfarah commented 3 years ago

@tkoumrian Done in: https://github.com/SETIatHCRO/ATA-Utils/blob/master/pythonLibs/ATATools/ata_control.py#L422

Although the REST call only supports one antenna at a time. Adds a couple of seconds of bottleneck, not a biggie, but would be nice if it is not the case