ThiagoFerrao / solum

APIs for OEMs to Create Standalone Applications
https://www.clarius.com
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

`setImagingCallback` not called when toggling imaging #2

Open ujrm opened 3 months ago

ujrm commented 3 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Tap Download scanner info
  2. Enable Bluetooth searching
  3. Select probe
  4. Tap Load Selected Scanner Details
  5. Connect to probe's WiFi
  6. Tap Connect
  7. Change Application to "msk"
  8. Tap Load Application

setImagingCallback is called twice, both reporting the state and imageRunning correctly.

  1. Tap Run Imaging

setImagingCallback is not called.

  1. Change the depth

setImagingCallback is called, reporting the state and imageRunning correctly

Environment:

clariusk commented 3 months ago

Clarius Update, new documentation in development branch - tag 11.4

/// imaging callback function
/// used primarily to denote 4 different scenarios:
/// 1. when imaging is ready after an application load or parameter update (ImagingReady state)
/// 2. when there is an error after trying to load an application or updating a parameter (ImagingNotReady state)
/// 3. when the low bandwidth flag has changed to denote that imaging has been re-optimized for the network performance (LowBandwidth state)
/// 4. when the probe has frozen or unfrozen due to an internal state change (all other states)
/// @param[in] state the imaging state
/// @param[in] imaging 1 = running , 0 = stopped
typedef void (*CusImagingFn)(CusImagingState state, int imaging);

It was not clear before that this function is NOT called when there is a user run/stop change made via the solumRun() function. It may be looked at in the future to update functionality.

ujrm commented 3 months ago

Is there any way for us to query the SDK to know if the probe is imaging or not?

clariusk commented 3 months ago

will now use callback for when SDK layer manually calls run/stop, redundant user call to imagingState() in example code removed.