mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
Arduino: fix serial monitor
This commit is contained in:
@@ -6,7 +6,7 @@ used to write and upload computer code to the board."
|
||||
HOMEPAGE="http://arduino.org"
|
||||
COPYRIGHT="2016 Arduino S.r.l. - Italy"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="4"
|
||||
REVISION="5"
|
||||
SOURCE_URI="https://github.com/arduino-cli/arduino-version/releases/download/$portVersion/arduino-$portVersion-linux32.zip"
|
||||
CHECKSUM_SHA256="c80560935109121c4a8db6b34404bbdeb45e421584a895ca2277babc468f3b6a"
|
||||
SOURCE_DIR="arduino-$portVersion-linux32"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 59fa3a394ab41d5940eeb92ba82370c9100c5132 Mon Sep 17 00:00:00 2001
|
||||
From cfb5005beb20e4568e479fa3b113315ebf99f186 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 6 Apr 2017 23:53:59 +0000
|
||||
Subject: Move preferences to haiku settings folder
|
||||
@@ -20,5 +20,5 @@ index fc42cad..191fc13 100644
|
||||
|
||||
/*
|
||||
--
|
||||
2.7.0
|
||||
2.36.1
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 25fc9bd1d8880fcbc1f26d8c521e20ccdb468f42 Mon Sep 17 00:00:00 2001
|
||||
From 5845caa5ebf3789b173a3ccf10ddd9b95595b911 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Wed, 10 Jun 2015 23:31:37 +1000
|
||||
Date: Tue, 28 Jun 2022 22:03:31 +1000
|
||||
Subject: Add binary launcher
|
||||
|
||||
|
||||
@@ -209,12 +209,12 @@ index 0000000..4518f05
|
||||
+
|
||||
diff --git a/haiku/MainApp.h b/haiku/MainApp.h
|
||||
new file mode 100644
|
||||
index 0000000..1199bec
|
||||
index 0000000..7ec4cb9
|
||||
--- /dev/null
|
||||
+++ b/haiku/MainApp.h
|
||||
@@ -0,0 +1,24 @@
|
||||
+#ifndef DOSBOXLAUNCHER_H
|
||||
+#define DOSBOXLAUNCHER_H
|
||||
+#ifndef SIMPLE_LAUNCHER_H
|
||||
+#define SIMPLE_LAUNCHER_H
|
||||
+
|
||||
+#include <Application.h>
|
||||
+#include <String.h>
|
||||
@@ -230,8 +230,8 @@ index 0000000..1199bec
|
||||
+ void RefsReceived(BMessage *pmsg);
|
||||
+ void ArgvReceived(int32 argc, char **argv);
|
||||
+ virtual void ReadyToRun();
|
||||
+ void InstallMimeType(const char *app, const char *mimetxt, const char *text, const char *ext);
|
||||
+ BPath MyPath(const char *dir);
|
||||
+ void InstallMimeType(const char *app, const char *mimetxt, const char *text, const char *ext);
|
||||
+ BPath MyPath(const char *dir);
|
||||
+ BMessenger fTrackerMessenger;
|
||||
+};
|
||||
+
|
||||
@@ -262,7 +262,7 @@ index 0000000..4371da4
|
||||
+ rm -f "Arduino IDE" $(OBJS)
|
||||
diff --git a/haiku/resource.rdef b/haiku/resource.rdef
|
||||
new file mode 100644
|
||||
index 0000000..b795392
|
||||
index 0000000..f174d8b
|
||||
--- /dev/null
|
||||
+++ b/haiku/resource.rdef
|
||||
@@ -0,0 +1,152 @@
|
||||
@@ -270,7 +270,7 @@ index 0000000..b795392
|
||||
+resource app_version {
|
||||
+ major = 1,
|
||||
+ middle = 7,
|
||||
+ minor = 4,
|
||||
+ minor = 11,
|
||||
+
|
||||
+ variety = B_APPV_DEVELOPMENT,
|
||||
+ internal = 0,
|
||||
@@ -419,51 +419,5 @@ index 0000000..b795392
|
||||
+};
|
||||
+
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 1555ad1aeae85e15427d5ecad337e6af11603e49 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 7 Apr 2017 00:37:59 +0000
|
||||
Subject: Cleanup code and set actual version
|
||||
|
||||
|
||||
diff --git a/haiku/MainApp.h b/haiku/MainApp.h
|
||||
index 1199bec..7ec4cb9 100644
|
||||
--- a/haiku/MainApp.h
|
||||
+++ b/haiku/MainApp.h
|
||||
@@ -1,5 +1,5 @@
|
||||
-#ifndef DOSBOXLAUNCHER_H
|
||||
-#define DOSBOXLAUNCHER_H
|
||||
+#ifndef SIMPLE_LAUNCHER_H
|
||||
+#define SIMPLE_LAUNCHER_H
|
||||
|
||||
#include <Application.h>
|
||||
#include <String.h>
|
||||
@@ -15,8 +15,8 @@ class SimpleLauncherApp : public BApplication {
|
||||
void RefsReceived(BMessage *pmsg);
|
||||
void ArgvReceived(int32 argc, char **argv);
|
||||
virtual void ReadyToRun();
|
||||
- void InstallMimeType(const char *app, const char *mimetxt, const char *text, const char *ext);
|
||||
- BPath MyPath(const char *dir);
|
||||
+ void InstallMimeType(const char *app, const char *mimetxt, const char *text, const char *ext);
|
||||
+ BPath MyPath(const char *dir);
|
||||
BMessenger fTrackerMessenger;
|
||||
};
|
||||
|
||||
diff --git a/haiku/resource.rdef b/haiku/resource.rdef
|
||||
index b795392..f174d8b 100644
|
||||
--- a/haiku/resource.rdef
|
||||
+++ b/haiku/resource.rdef
|
||||
@@ -2,7 +2,7 @@ resource app_flags B_MULTIPLE_LAUNCH;
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 7,
|
||||
- minor = 4,
|
||||
+ minor = 11,
|
||||
|
||||
variety = B_APPV_DEVELOPMENT,
|
||||
internal = 0,
|
||||
--
|
||||
2.21.0
|
||||
2.36.1
|
||||
|
||||
|
||||
@@ -1,41 +1,55 @@
|
||||
From c1ec0feff48494daf1020c6bd0e4942533a44737 Mon Sep 17 00:00:00 2001
|
||||
From 7bebc162b89afe4db9b8253a80441d4a567d9912 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 11 Jun 2015 18:18:38 +1000
|
||||
Date: Tue, 28 Jun 2022 22:32:41 +1000
|
||||
Subject: Add haiku support for jssc
|
||||
|
||||
|
||||
diff --git a/src/cpp/_nix_based/jssc.cpp b/src/cpp/_nix_based/jssc.cpp
|
||||
index 634b620..b642cd1 100644
|
||||
index 634b620..362fd9e 100644
|
||||
--- a/src/cpp/_nix_based/jssc.cpp
|
||||
+++ b/src/cpp/_nix_based/jssc.cpp
|
||||
@@ -42,7 +42,10 @@
|
||||
@@ -42,7 +42,9 @@
|
||||
#ifdef __APPLE__
|
||||
#include <serial/ioss.h>//Needed for IOSSIOSPEED in Mac OS X (Non standard baudrate)
|
||||
#endif
|
||||
-
|
||||
+#ifdef __HAIKU__
|
||||
+ #define TIOCOUTQ -1
|
||||
+ #define TIOCM_RNG 0200
|
||||
+ #define TIOCM_RNG 0x04
|
||||
+#endif
|
||||
#include <jni.h>
|
||||
#include "../jssc_SerialNativeInterface.h"
|
||||
|
||||
@@ -692,9 +695,14 @@ const jint INTERRUPT_PARITY = 8192;
|
||||
@@ -560,7 +562,9 @@ JNIEXPORT jintArray JNICALL Java_jssc_SerialNativeInterface_getBuffersBytesCount
|
||||
returnValues[1] = -1; //Output buffer
|
||||
jintArray returnArray = env->NewIntArray(2);
|
||||
ioctl(portHandle, FIONREAD, &returnValues[0]);
|
||||
+#ifndef __HAIKU__
|
||||
ioctl(portHandle, TIOCOUTQ, &returnValues[1]);
|
||||
+#endif
|
||||
env->SetIntArrayRegion(returnArray, 0, 2, returnValues);
|
||||
return returnArray;
|
||||
}
|
||||
@@ -692,6 +696,9 @@ const jint INTERRUPT_PARITY = 8192;
|
||||
|
||||
const jint EV_CTS = 8;
|
||||
const jint EV_DSR = 16;
|
||||
-const jint EV_RING = 256;
|
||||
+#ifdef __HAIKU__
|
||||
+const jint EV_RLSD = 32;
|
||||
+const jint EV_RXCHAR = 256;
|
||||
+#else
|
||||
+const jint EV_RING 256
|
||||
+#undef EV_RING
|
||||
+#endif
|
||||
const jint EV_RING = 256;
|
||||
const jint EV_RLSD = 32;
|
||||
const jint EV_RXCHAR = 1;
|
||||
@@ -727,8 +734,9 @@ JNIEXPORT jobjectArray JNICALL Java_jssc_SerialNativeInterface_waitEvents
|
||||
|
||||
/*Output buffer*/
|
||||
jint bytesCountOut = 0;
|
||||
+#ifndef __HAIKU__
|
||||
ioctl(portHandle, TIOCOUTQ, &bytesCountOut);
|
||||
-
|
||||
+#endif
|
||||
//const jint EV_RXFLAG = 2; //Not supported
|
||||
const jint EV_TXEMPTY = 4;
|
||||
const jint events[] = {INTERRUPT_BREAK,
|
||||
/*Lines status*/
|
||||
int statusLines = getLinesStatus(portHandle);
|
||||
|
||||
diff --git a/src/cpp/jssc_SerialNativeInterface.h b/src/cpp/jssc_SerialNativeInterface.h
|
||||
index 7029b1b..fcd7bb2 100644
|
||||
--- a/src/cpp/jssc_SerialNativeInterface.h
|
||||
@@ -131,5 +145,5 @@ index 5af9a95..87a7ee4 100644
|
||||
PORTNAMES_REGEXP = Pattern.compile("[0-9]*|[a-z]*");
|
||||
PORTNAMES_PATH = "/dev/term/";
|
||||
--
|
||||
2.2.2
|
||||
2.36.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user