Расширить общие API графиков и GAS обмена
This commit is contained in:
@@ -17,10 +17,11 @@ enum set_plot_operation {
|
||||
SET_PLOT_DRAG = 4, /* initial,deltaPixels,length,low,high,inverted -> clamped value */
|
||||
SET_PLOT_TICK_STEP = 5, /* range,lengthPixels -> nice step */
|
||||
SET_PLOT_DELTA = 6, /* A,B,multiplier -> (B-A)*multiplier */
|
||||
SET_PLOT_DB_DELTA = 7 /* A,B -> 20*log10(abs(B/A)); zero is invalid */
|
||||
SET_PLOT_DB_DELTA = 7, /* A,B -> 20*log10(abs(B/A)); zero is invalid */
|
||||
SET_PLOT_LIMITS = 8 /* xMin,xMax,yMin,yMax -> validated unchanged limits */
|
||||
};
|
||||
|
||||
/** Version of this plot ABI, independently of the transport ABI. */
|
||||
/** Version of this plot ABI, independently of the transport ABI (currently 2). */
|
||||
PCAN_ABI_API uint32_t set_plot_abi_version(void);
|
||||
/** Evaluates one operation. Returns output count, or 0 for invalid arguments.
|
||||
* TRANSFORM rejects malformed viewports; invalid gesture values return the
|
||||
|
||||
@@ -28,6 +28,15 @@ PCAN_ABI_API int set_spectrum_analyze(const double *times, const double *values,
|
||||
size_t max_size, int window, int filter, double low_hz, double high_hz, int remove_mean,
|
||||
double *amplitudes, size_t capacity, double *meta);
|
||||
|
||||
/** Find the strongest non-DC local maximum above both the absolute floor and
|
||||
* relative_threshold * median(non-DC amplitudes). The caller supplies scratch
|
||||
* storage of at least count-1 doubles. peak = {frequency_hz, amplitude}.
|
||||
* Returns 1 when found, 0 when no narrow-band peak exists, -1 on invalid input.
|
||||
*/
|
||||
PCAN_ABI_API int set_spectrum_dominant_peak(const double *amplitudes, size_t count,
|
||||
double bin_hz, double relative_threshold, double absolute_floor,
|
||||
double *scratch, size_t scratch_capacity, double *peak, size_t peak_capacity);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -48,6 +48,13 @@ PCAN_ABI_API int set_trend_watch_ack(
|
||||
PCAN_ABI_API int set_trend_watch_values(
|
||||
const uint8_t *payload, size_t size, uint16_t *words, size_t capacity);
|
||||
|
||||
/** Decode the complete GAS_WATCH_DATA payload including its device timestamp.
|
||||
* This is the preferred ABI for GUI ports; the older values-only symbol remains
|
||||
* available for binary compatibility.
|
||||
*/
|
||||
PCAN_ABI_API int set_trend_watch_decode(const uint8_t *payload, size_t size,
|
||||
uint32_t *timestamp_ms, uint16_t *words, size_t capacity);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user