mirror of
https://github.com/dgis/emu48android
synced 2024-12-26 09:58:49 +01:00
Put back Serial slowdown setting.
This commit is contained in:
parent
59a4f70cff
commit
8a8f2d8ce7
10 changed files with 42 additions and 36 deletions
|
@ -17,7 +17,7 @@ QUICK START
|
|||
|
||||
1. From the left side, slide your finger to open the menu.
|
||||
2. Touch the "New..." menu item.
|
||||
3. Select a default calculator (or with Android >= 5.0, "[Select a Custom KML script folder...]" where you have copied the KML scripts and ROM files (Android 11 cannot use the folder Download)).
|
||||
3. Select a default calculator (or "[Select a Custom KML script folder...]" where you have copied the KML scripts and ROM files (Android 11 may not be able to use the Download folder)).
|
||||
4. And the calculator should now be opened.
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@ NOTES
|
|||
without the need to be root. If it is not automatic, please, activate the OTG mode in your Android device, and then,
|
||||
you should be able to see it in the Emu48 settings.
|
||||
It is still experimental and I see some issues when sending characters from the emulator to a real HP48 or HP49 with the kermit protocol.
|
||||
For the moment, the communication has been artificially slowed down in this direction.
|
||||
The communication can be artificially slowed down in this direction using an option.
|
||||
If the adapter is unplugged then plugged back in, you may need to call OPENIO/CLOSEIO.
|
||||
|
||||
|
||||
|
@ -58,12 +58,14 @@ LINKS
|
|||
|
||||
CHANGES
|
||||
|
||||
Version 2.7 (2023-07-XX)
|
||||
Version 2.7 (2024-06-XX)
|
||||
|
||||
- Updated source code with Emu48 version 1.65+. This new version improve the serial communication.
|
||||
- Attempt to fix haptic feedback with Android 13 (API deprecation).
|
||||
- Patch the ROM files to prevent the calculator to sleep (Fix #22).
|
||||
- Fix a potential crash about the permission to access the files.
|
||||
- Require at least Android 5.0 (4.4 previously).
|
||||
BUG: In Emu48 with HP49 FlashCard, click on Android RECENT button, and comes back in the APP -> we lost the FlashCard!
|
||||
|
||||
|
||||
Version 2.6 (2022-08-19)
|
||||
|
|
|
@ -29,11 +29,11 @@ if (keystorePropertiesFile.exists()) {
|
|||
|
||||
android {
|
||||
namespace 'org.emulator.forty.eight'
|
||||
compileSdk 33
|
||||
compileSdk 34
|
||||
defaultConfig {
|
||||
applicationId "org.emulator.forty.eight"
|
||||
minSdk 19
|
||||
targetSdk 33
|
||||
minSdk 21
|
||||
//targetSdk 33
|
||||
versionCode 26
|
||||
versionName "2.7"
|
||||
setProperty("archivesBaseName", "Emu48-v$versionName")
|
||||
|
@ -79,10 +79,10 @@ android {
|
|||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'com.google.android.material:material:1.9.0'
|
||||
implementation 'androidx.preference:preference:1.2.0'
|
||||
implementation 'com.google.android.material:material:1.12.0'
|
||||
implementation 'androidx.preference:preference:1.2.1'
|
||||
implementation 'androidx.documentfile:documentfile:1.0.1'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test:runner:1.5.2'
|
||||
|
|
|
@ -17,7 +17,7 @@ QUICK START
|
|||
|
||||
1. From the left side, slide your finger to open the menu.
|
||||
2. Touch the "New..." menu item.
|
||||
3. Select a default calculator (or with Android >= 5.0, "[Select a Custom KML script folder...]" where you have copied the KML scripts and ROM files (Android 11 cannot use the folder Download)).
|
||||
3. Select a default calculator (or "[Select a Custom KML script folder...]" where you have copied the KML scripts and ROM files (Android 11 may not be able to use the Download folder)).
|
||||
4. And the calculator should now be opened.
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@ NOTES
|
|||
without the need to be root. If it is not automatic, please, activate the OTG mode in your Android device, and then,
|
||||
you should be able to see it in the Emu48 settings.
|
||||
It is still experimental and I see some issues when sending characters from the emulator to a real HP48 or HP49 with the kermit protocol.
|
||||
For the moment, the communication has been artificially slowed down in this direction.
|
||||
The communication can be artificially slowed down in this direction using an option.
|
||||
If the adapter is unplugged then plugged back in, you may need to call OPENIO/CLOSEIO.
|
||||
|
||||
|
||||
|
@ -58,12 +58,13 @@ LINKS
|
|||
|
||||
CHANGES
|
||||
|
||||
Version 2.7 (2023-07-XX)
|
||||
Version 2.7 (2024-06-09)
|
||||
|
||||
- Updated source code with Emu48 version 1.65+. This new version improve the serial communication.
|
||||
- Attempt to fix haptic feedback with Android 13 (API deprecation).
|
||||
- Patch the ROM files to prevent the calculator to sleep (Fix #22).
|
||||
- Fix a potential crash about the permission to access the files.
|
||||
- Require at least Android 5.0 (4.4 previously).
|
||||
|
||||
|
||||
Version 2.6 (2022-08-19)
|
||||
|
|
|
@ -342,7 +342,7 @@ BOOL WriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite,LPDWO
|
|||
free(hexAsciiDump);
|
||||
#endif
|
||||
if(serialPortSlowDown)
|
||||
Sleep(4); // Seems to be needed else the kermit packet does not fully reach the genuine calculator.
|
||||
Sleep(4); // Seems to be needed else kermit/XSend packets do not fully reach the genuine calculator.
|
||||
if(lpNumberOfBytesWritten)
|
||||
*lpNumberOfBytesWritten = (DWORD) writenByteCount;
|
||||
return writenByteCount >= 0;
|
||||
|
|
|
@ -306,7 +306,7 @@ public class PanAndScaleView extends View {
|
|||
public boolean onDown(MotionEvent e) {
|
||||
if(debug) Log.d(TAG, "onDown() actionIndex: " + e.getActionIndex() + ", X: " + e.getX() + ", Y: " + e.getY());
|
||||
scroller.forceFinished(true);
|
||||
ViewCompat.postInvalidateOnAnimation(PanAndScaleView.this);
|
||||
PanAndScaleView.this.postInvalidateOnAnimation();
|
||||
if(onTapDownListener != null) {
|
||||
float scaleAndPanX = (e.getX() - viewPanOffsetX) / viewScaleFactorX;
|
||||
float scaleAndPanY = (e.getY() - viewPanOffsetY) / viewScaleFactorY;
|
||||
|
@ -386,7 +386,7 @@ public class PanAndScaleView extends View {
|
|||
(int)(velocityFactor * velocityX), (int)(velocityFactor * velocityY),
|
||||
0, -(int)viewPanMinX,
|
||||
0, -(int)viewPanMinY);
|
||||
ViewCompat.postInvalidateOnAnimation(PanAndScaleView.this);
|
||||
PanAndScaleView.this.postInvalidateOnAnimation();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -20,6 +20,7 @@ import org.emulator.calculator.usbserial.driver.UsbSerialProber;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
@ -43,14 +44,14 @@ public class DevicesFragment extends ListFragment {
|
|||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setHasOptionsMenu(true);
|
||||
listAdapter = new ArrayAdapter<ListItem>(getActivity(), 0, listItems) {
|
||||
//setHasOptionsMenu(true);
|
||||
listAdapter = new ArrayAdapter<ListItem>(requireActivity(), 0, listItems) {
|
||||
@NonNull
|
||||
@Override
|
||||
public View getView(int position, View view, @NonNull ViewGroup parent) {
|
||||
ListItem item = listItems.get(position);
|
||||
if (view == null)
|
||||
view = getActivity().getLayoutInflater().inflate(Utils.resId(DevicesFragment.this, "layout", "device_list_item"), parent, false);
|
||||
view = requireActivity().getLayoutInflater().inflate(Utils.resId(DevicesFragment.this, "layout", "device_list_item"), parent, false);
|
||||
TextView text1 = view.findViewById(Utils.resId(DevicesFragment.this, "id", "text1"));
|
||||
TextView text2 = view.findViewById(Utils.resId(DevicesFragment.this, "id", "text2"));
|
||||
if(item.driver == null)
|
||||
|
@ -73,7 +74,7 @@ public class DevicesFragment extends ListFragment {
|
|||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
setListAdapter(null);
|
||||
View header = getActivity().getLayoutInflater().inflate(Utils.resId(DevicesFragment.this, "layout", "device_list_header"), null, false);
|
||||
View header = requireActivity().getLayoutInflater().inflate(Utils.resId(DevicesFragment.this, "layout", "device_list_header"), null, false);
|
||||
getListView().addHeaderView(header, null, false);
|
||||
setEmptyText(getString(Utils.resId(this, "string", "serial_no_device")));
|
||||
((TextView) getListView().getEmptyView()).setTextSize(18);
|
||||
|
|
|
@ -188,11 +188,11 @@
|
|||
android:title="@string/settings_serial_ports_ir_title"
|
||||
android:summary=""
|
||||
/>
|
||||
<!-- <SwitchPreference-->
|
||||
<!-- android:defaultValue="false"-->
|
||||
<!-- android:key="settings_serial_slowdown"-->
|
||||
<!-- android:title="@string/settings_serial_slowdown"-->
|
||||
<!-- />-->
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="settings_serial_slowdown"
|
||||
android:title="@string/settings_serial_slowdown"
|
||||
/>
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
|
18
build.gradle
18
build.gradle
|
@ -4,10 +4,10 @@ buildscript {
|
|||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.0.2'
|
||||
classpath 'com.android.tools.build:gradle:8.3.2'
|
||||
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
@ -18,14 +18,16 @@ buildscript {
|
|||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
||||
tasks.withType(JavaCompile).tap {
|
||||
configureEach {
|
||||
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
//task clean(type: Delete) {
|
||||
// delete rootProject.buildDir
|
||||
//}
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
#android.defaults.buildfeatures.buildconfig=true
|
||||
android.enableJetifier=true
|
||||
android.nonFinalResIds=false
|
||||
android.nonTransitiveRClass=false
|
||||
android.nonFinalResIds=true
|
||||
android.nonTransitiveRClass=true
|
||||
android.useAndroidX=true
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
org.gradle.unsafe.configuration-cache=true
|
||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
|||
#Sat Jan 28 21:16:38 CET 2023
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
Loading…
Reference in a new issue