Commit 28cf6221 authored by pbethge's avatar pbethge
Browse files

first thingboard push

parent 0374c693
http -v -j POST https://thingsboard.zkm.de/api/v1/rFKmcjtHSLgVvrT6NaCB/telemetry lang=$1
......@@ -108,6 +108,8 @@ void ofApp::update() {
// only send & display label when probabilty is high enough
if(prob >= minConfidence) {
displayLabel = labelsMap[argMax];
std::string cmd = ofToDataPath("send_http.sh") + " " + std::to_string(argMax);
ofSystem(cmd);
ofxOscMessage message;
message.setAddress("/lang");
message.addIntArg(argMax);
......
  • I feel like this could be modularized through the commandline argument handling. There could be a flag which accepts a string to run when the lang is detected and has a key that gets replaced by either the lang name and/or the index ala:

    $ LanguageIdentifer --cmd "./send_http.sh $LANGID"

    This way we avoid hard coding our platform/usage-specific stuff.

    Edited by Dan Wilcox
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment