New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file read flag for powqutyd #20

Merged
merged 1 commit into from Jun 30, 2017

Conversation

Projects
None yet
3 participants
@ikstream
Contributor

ikstream commented Jun 27, 2017

To use a file instead of the regular usb oscilloscope input start PowQuty with
powqutyd -f /path/to/file

Signed-off-by: Stefan Venz stefan.venz@protonmail.com

Add file read flag for powqutyd
Signed-off-by: Stefan Venz <stefan.venz@protonmail.com>
@thuehn

thuehn approved these changes Jun 30, 2017

Looks good so far.

@thuehn thuehn merged commit 4a9f895 into thuehn:master Jun 30, 2017

@nadim-el-sayed

This comment has been minimized.

Show comment
Hide comment
@nadim-el-sayed

nadim-el-sayed Aug 3, 2017

Collaborator

This commit seems to break the build. Please check:

root@LEDE:~# powqutyd
looking up dev_uuid: currently ==> BERTUB001
looking up dev_lat: currently ==> 52.520008
looking up dev_lon: currently ==> 13.404954
looking up device_tty currently ==> /dev/ttyACM0
looking up powquty_path currently ==> /tmp/powquty.log
looking up mqtt_host: currently ==> localhost
looking up mqtt_topic: currently ==> devices/update
looking up mqtt_uname: currently ==> username
looking up mqtt_pw: currently ==> password
looking up mqtt_event_host: currently ==> localhost
looking up mqtt_event_topic: currently ==> devices/event
Starting powqutyd ...
dev_uuid: BERTUB001
powqutyd_print: 1
MQTT_LIB_VERSION: Ret: 1004014 Maj: 1 Min: 4 Rev: 14
DEBUG: Creating MQTT Thread
MQTT Thread started
DEBUG: MQTT Thread has started
DEBUG: Creating Retrieval Thread
DEBUG: Retrieval Thread has started
Offset: -58.226562 Scaling: 0.012203
DEBUG: Retrieval Thread started
Calculation Thread started
DEBUG: Calculation Thread has started
ERROR: Could not open file (null)
BERTUB001,1501776259.1246,1,0.1,0.1,029
BERTUB001,1501776259.1247,2,52.520008,13.404954,0,2,50
DEBUG: Joining Calculation Thread
DEBUG: Joining Retrieval Thread

Collaborator

nadim-el-sayed commented Aug 3, 2017

This commit seems to break the build. Please check:

root@LEDE:~# powqutyd
looking up dev_uuid: currently ==> BERTUB001
looking up dev_lat: currently ==> 52.520008
looking up dev_lon: currently ==> 13.404954
looking up device_tty currently ==> /dev/ttyACM0
looking up powquty_path currently ==> /tmp/powquty.log
looking up mqtt_host: currently ==> localhost
looking up mqtt_topic: currently ==> devices/update
looking up mqtt_uname: currently ==> username
looking up mqtt_pw: currently ==> password
looking up mqtt_event_host: currently ==> localhost
looking up mqtt_event_topic: currently ==> devices/event
Starting powqutyd ...
dev_uuid: BERTUB001
powqutyd_print: 1
MQTT_LIB_VERSION: Ret: 1004014 Maj: 1 Min: 4 Rev: 14
DEBUG: Creating MQTT Thread
MQTT Thread started
DEBUG: MQTT Thread has started
DEBUG: Creating Retrieval Thread
DEBUG: Retrieval Thread has started
Offset: -58.226562 Scaling: 0.012203
DEBUG: Retrieval Thread started
Calculation Thread started
DEBUG: Calculation Thread has started
ERROR: Could not open file (null)
BERTUB001,1501776259.1246,1,0.1,0.1,029
BERTUB001,1501776259.1247,2,52.520008,13.404954,0,2,50
DEBUG: Joining Calculation Thread
DEBUG: Joining Retrieval Thread

if (file == NULL) {
printf("ERROR:\tCould not open file %s\n", input_file);
return NULL;

This comment has been minimized.

@nadim-el-sayed

nadim-el-sayed Aug 3, 2017

Collaborator

This seem to cause the problem

@nadim-el-sayed

nadim-el-sayed Aug 3, 2017

Collaborator

This seem to cause the problem

This comment has been minimized.

@ikstream

ikstream Aug 3, 2017

Contributor

There seems to be an if condition missing. checking it right now

@ikstream

ikstream Aug 3, 2017

Contributor

There seems to be an if condition missing. checking it right now

@ikstream ikstream deleted the ikstream:add_input_file branch Mar 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment