DroneKit Joystick Override - joystick

I'm trying to figure out if it's possible to use DroneKit to override joystick control when it's enabled in Mission Planner. In my scenario if I enable joystick in Mission Planner and forcibly close Mission Planner, the joystick still maintains control over the UAV. Knowing that I'm still able to use switches on my RC transmitter, I'd like to be able to flip a switch and have joystick mode disabled so that the RC then has full control of the UAV again.
Would appreciate any pointers or examples if they already exist. I'm familiar with DroneKit and how to monitor RC channels, so looking more for what command I need to send to disable joystick mode.
Many thanks

Related

Windows disable screen share and programmatic input

For security reasons
I want to disable screen shot or screen sharing by any known/unknown program.
I also want to disable any programmatic mouse and keyboard or any other input. While physical keyboard/mouse should work.
Only person sitting in front of the computer should be able to access physical machine without any issue.
This is for security reason. No body should be able to put malware/spyware and see what i am doing.
SetwindowDisplayAffinity to disable screen shot of a window.
Use a low-level keyboard hook to detect and ignore injected keystrokes.

How can I programmatically attach/detach displays in Windows 10?

I'm wondering if there's a good way to automate changing my display configuration in Windows 10?
I have 3 monitors attached, and I find myself wanting to configure my system in one of 3 ways:
All monitors set up to extend the desktop.
Only my central (largest) monitor enabled, others both disabled.
Only my right-most monitor enabled, others both disabled (I think hook up a spare HDMI cable on my center monitor to my laptop, and the monitor automatically switches to that input).
Manually, this involves opening the Display Settings panel, selecting the monitors, and either marking them as "Disconnected" or "Extend desktop on this display".
Is there some nice, scripting-friendly way to do this? I'm more comfortable doing this sorta thing on Linux, where I'd whip up a quick shell script to call the xrandr command a few times, or something like that...

using remote control after pauseMissionWithCompletion in DJI SDK

After pausing a mission using pauseMissionWithCompletion, i'm trying to manually move the aircraft to a different position using the remote control but the joystick does not respond to my inputs. However, if I resume the mission, the aircraft's flight can be overridden by the joystick. Does anyone know how to enable the joystick while the mission is paused?
Some missions might make the aircraft enter virtualStickMode (all missions which include yaw movement do that). If you pause the mission when it is in virtualStickMode, you will not have control of the joysticks. If you really want joystick control after pausing mission, you can flip the mode on the remote to atti mode and back, that should give you back the control of joysticks. However, I think it also does cancel the mission.
I don't think you can accomplish what you want - pause the mission, move to a different location, and then resume the mission. If you want accomplish what you are looking for is to: stop the mission. Set move via joystick and/or virtual stick to a different location. Then upload the remainder of the mission.

Low level keyboard hook

I just bought a new keyboard, and I'm interested in tracking exactly how many keypresses/strokes I make during the entire life of the keyboard. (I would want to just record keyUp, as I don't care about repeats)
I've been googling around for the best way to do this, but I don't even know what approach to take, so I'm having trouble searching intelligently.
Also, the only language I've really worked with is C#. Haven't done anything with C/C++ or WinAPI
Is it difficult to modify the Win 7 drivers directly?
I do want to be able to record keystrokes from the moment the computer boots, but this may not be easily done.
I would prefer to use an existing driver or hook, as I really don't care to get into learning device drivers right now.
I've looked briefly at Ctrl2Cap, but I don't know how to modify something like that to suit my case.
Other questions I looked at,
Writing a keyboard device driver
Low level keyboard Hook not at UI thread
This one indicates writing a USB Filter driver may work, but I have no clue where to start on that.
Disabling the keyboard in windows c++?
It is not necessary to go the driver route, which is not for the faint of heart. You can use use a low level keyboard hook which will work fine from .NET.
I did a quick bing and found the following on codeplex
http://globalmousekeyhook.codeplex.com/
It should get you going
If you want to do that you need to use Kernel Level Keylogger. It's grabs the keystrokes before the operating system takes effects and this one 99% invisible for detection techniques. Then you can grab the Windows Log On screen typed things like password/username etc.
#ChrisTaylor's key logger not work for WinLog-on Screen I reckon. If you can install the keyboard driver filter before the system keyboard device driver take a action you can handle windows user login screen also. But In order to install this driver level key hook you need to have administrator privileges.
I found Unix and Windows Keyloggers from Github. Free to play with this https://www.adlice.com/kernelmode-rootkits-part-3-kernel-filters/ and have fun!
That, what you want is dangerous!
With the same code everyone can create keylogger*
But if you not a virus creator then I recommend you to search "hotkeying in C/C++" or something like that and hook keyboard with hotkeys!
I have written HotKey Maker in VB6 which can make hotkey from every button of keyboard.
But I really not interested in viruses :)
Good Luck !
*Virus which hooks your keyboard and send all what you wrote in keyboard to Virus owner

Programmatically disabling mouse acceleration in Windows

When I use my laptop's trackpad I want acceleration on, but when I have a mouse plugged in I normally want it off. I couldn't find a fast way to make the change, so I'd like to make a simple application that lets you switch it on or off at the press of a button. Does anyone know of a way to disable or enable mouse acceleration in Windows either via some sort of COM or system function (any language), or a command line program?
For clarification, here is the setting I'd like to change:

Resources