Добавить общие графики, декодер KONOR и порт STM32 bxCAN

This commit is contained in:
2026-09-04 12:22:17 +03:00
parent af82687e42
commit e163d9ba55
51 changed files with 5040 additions and 15 deletions

View File

@@ -0,0 +1,22 @@
#include <jni.h>
#include "set_plot.h"
JNIEXPORT jdoubleArray JNICALL
Java_ru_setcorp_setprotocol_trends_NativePlot_evaluate(JNIEnv *env, jobject self,
jint operation, jdoubleArray input) {
double values[10], result[4];
jsize n;
size_t count;
jdoubleArray output;
(void)self;
if (!input) return NULL;
n = (*env)->GetArrayLength(env, input);
if (n < 0 || n > 10) return NULL;
(*env)->GetDoubleArrayRegion(env, input, 0, n, values);
if ((*env)->ExceptionCheck(env)) return NULL;
count = set_plot_eval((uint32_t)operation, values, (size_t)n, result, 4);
if (!count) return NULL;
output = (*env)->NewDoubleArray(env, (jsize)count);
if (output) (*env)->SetDoubleArrayRegion(env, output, 0, (jsize)count, result);
return output;
}