-
Notifications
You must be signed in to change notification settings - Fork 592
Adding Nodejs controller #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Some minor fixes to main android app.
…clients and easier to deal with.
…into Ivo/controller-js
…into Ivo/controller-js
…into Ivo/controller-js
…into Ivo/controller-js
Sorry for the multiple commits. I was trying to squish all commits together. |
@izivkov, is this ready for review or are you still working on it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, need to test.
If possible, it would be good to reduce the image size by saving as jpg.
I wonder if it makes sense to remove the RTSP connection in the controller app to reduce the apk size. Or do you see any benefit in using the RTSP connection over WebRTC?
|
||
private fun onDataReceived(data: String) { | ||
setOnOffStateConditions(data) | ||
// private fun onDataReceived(data: String) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this function commented out? Since it is not used, is there value in keeping it in the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the handling and the "mute" and "mirror" button to the client side. Before that, we would send a message to the server (main Android app), and the server will disable sound. This has some advantages, but it is cumbersome, and less reliable. For RTSP, initially I could not figure out how to mute the sound on the client, so I removed the speaker icon completely. I later figured it out, so this function is no longer needed. I have removed the commented code.
controller-js/.eslintrc.json
Outdated
@@ -0,0 +1,3 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file needed?
@@ -0,0 +1,16 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file needed? Wouldn't it be automatically generated by users that install eslint. Or are there specific settings different from the standard settings?
@@ -0,0 +1,17 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments above.
It was supposed to be ready for review, but I keep thinking and adding enhancements. One last thing I wanted to add is a full-screen video mode. I had some issues in mirroring in full screen, but I will attempt to resolve today, and will let you know. |
About the JPG files, do you mean the images in the Readme file? Sure, I prob need to take another image again with the new buttons. I was using PNG because they are non-patented, and I thought would be preferred in a project like this. We can remove RTSP from and android app, and this will reduce complexity, but we should also think if we need RTSP at all. Is is useful in the Python app. How about a separate PR for that? |
I made some of the changes you recommended. Could not get full-screen to work well, so let us go with what we have. After making sure everything works OK for you, we may add video resizing. |
OK, I converted Screenshot.PNG to Screenshot.JPG, and it reduced the size somewhat. |
I have not tried this remotely, because my ISP has locked down my modem, and cannot open ports in the firewall. I would be curious if we can access the robot from outside the network. |
Yes, as discussed separate PR. Let's remove RTSP from the controller app, but keep it for streaming via VLC or in the python app. |
Did some testing and it works very nicely. I'm getting a latency of 190ms. What did you measure? I have a few comments:
|
Two more issue I encountered:
|
…iting full screen. Reset robot on shutdown.
Adding Nodejs controller
Adder Node.js based controller. Some minor fixes to main android app.