Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Software Error > BrickletSilentStepperV2.setCoolstepConfiguration > Javascript API ?

Featured Replies

Geschrieben
Hallo!
Beim Einsatz von "BrickletSilentStepperV2.setCoolstepConfiguration" zeigt sich bei der Parameter Übergabe von negativen Werten für das Argument "stallguardThresholdValue" ein unerwartetetes Ergebnis. 
 
Der Wertebereich des Parameters stallguardThresholdValue liegt nach Dokumentation zwischen -64 und 63.
Werte zwischen -64 und -1 werden falsch interpretiert
Die Abfrage mit getCoolstepConfiguration zeigt:
-1 ergibt 127
-2 ergibt 126
...
-64 ergibt 64
 
Im BrickV User Interface werden für negative Werte immer "63" angezeigt (siehe Anhang)
 
Die Übergabe schreibe ich zB. dabei so:
ss.setCoolstepConfiguration(2, 10, 0, 0, 0, -20, 1)
(Bold = stallguardThresholdValue)
 
Ist das ein Fehler in der JS API?
Oder mache ich etwas falsch?
 
Die offizielle Doku dazu:
https://www.tinkerforge.com/de/doc/Software/Bricklets/SilentStepperV2_Bricklet_JavaScript.html#silent-stepper-v2-bricklet-javascript-api
BrickletSilentStepperV2.setCoolstepConfiguration(minimumStallguardValue, maximumStallguardValue, currentUpStepWidth, currentDownStepWidth, minimumCurrent, stallguardThresholdValue, stallguardMode[, returnCallback][, errorCallback])
 
 
Danke im Voraus für Eure Rückmeldungen!
step_
 

Bildschirmfoto 2021-08-13 um 11.25.19.png

Geschrieben
  • Autor

Update:

Das Debug Log zeigt dazu diesen Fehler an.

2021-08-13 12:33:15 - CRITICAL - [Job:CSV-Writer] 'ascii' codec can't encode character '\xb0' in position 63: ordinal not in range(128)

Geschrieben
  • Autor

Hallo Photron,

mit der neuen Firmwar funktioniert es! Tausen Dank!

Herzlichen Gruss

Step_

Geschrieben
  • Autor

Data Logger Config:

{
  "data": {
    "csv": {
      "enabled": false,
      "file_name": "/logger_data_1628837611.csv"
    },
    "time_format": "de",
    "time_format_strftime": "%Y%m%d_%H%M%S"
  },
  "debug": {
    "log": {
      "enabled": false,
      "file_name": "/logger_debug_1628837611.log",
      "level": "debug"
    },
    "time_format": "de"
  },
  "devices": [
    {
      "host": "default",
      "name": "Silent Stepper Bricklet 2.0",
      "uid": "Uxi",
      "values": {
        "Chip Temperature": {
          "interval": 1
        },
        "Current Consumption": {
          "interval": 1
        },
        "Current Position": {
          "interval": 1
        },
        "Current Velocity": {
          "interval": 1
        },
        "Input Voltage": {
          "interval": 1
        }
      }
    },
    {
      "host": "default",
      "name": "Servo Bricklet 2.0",
      "uid": "SF6",
      "values": {
        "Chip Temperature": {
          "interval": 1
        },
        "Input Voltage": {
          "interval": 1
        },
        "Overall Current": {
          "interval": 1
        },
        "Servo Current (Servo 0)": {
          "interval": 1
        },
        "Servo Current (Servo 1)": {
          "interval": 0
        },
        "Servo Current (Servo 2)": {
          "interval": 0
        },
        "Servo Current (Servo 3)": {
          "interval": 7
        },
        "Servo Current (Servo 4)": {
          "interval": 3
        },
        "Servo Current (Servo 5)": {
          "interval": 0
        },
        "Servo Current (Servo 6)": {
          "interval": 6
        },
        "Servo Current (Servo 7)": {
          "interval": 0
        },
        "Servo Current (Servo 8)": {
          "interval": 0
        },
        "Servo Current (Servo 9)": {
          "interval": 0
        }
      }
    },
    {
      "host": "default",
      "name": "HAT Brick",
      "uid": "UDo",
      "values": {
        "Voltages": {
          "interval": 0,
          "subvalues": {
            "DC Voltage": true,
            "USB Voltage": true
          }
        }
      }
    },
    {
      "host": "default",
      "name": "Hall Effect Bricklet 2.0",
      "options": {
        " Debounce": {
          "value": 100000
        },
        "High Threshold": {
          "value": 2000
        },
        "Low Threshold": {
          "value": -2000
        }
      },
      "uid": "K9t",
      "values": {
        "Count": {
          "interval": 0
        },
        "Value": {
          "interval": 0
        }
      }
    }
  ],
  "hosts": {
    "default": {
      "name": "vogelautomat",
      "port": 4223,
      "secret": null
    }
  }
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.