Added better diagnostics in init_device
Allocate waveform vector in the heap
Added max length check in write_cmd
Fixed Running state
Tested with version ps firmware 1.2
Fixing off timeout command to 1 sec.
Release test with old PS firmware