Read the statement by Michael Teeuw here.
How to Swipe between pages
-
@sdetweil
Hi Sam, were you able to get the swipe functionality working and did you use the MMM-SmartTouch along with the MMM-Touch modules? If so, could you provide your code to get this working as I’m new to the Magic Mirror community and struggling to get this swipe functionality working.Thanks!
Seabass
-
@seabass wasnt me trying to do swipe. i was trying to help the OP debug and find out what was going on.
-
@sdetweil Sorry about that.
@TheSteveBennett were you able to get the swipe functionality working and did you use the MMM-SmartTouch along with the MMM-Touch modules? If so, could you provide your code to get this working as I’m new to the Magic Mirror community and struggling to get this swipe functionality working.
-
@seabass If you add MMM-ViewNotifications, does it show any notifications being sent?
-
@seabass neither of those modules support swipe
MMM-Swipe maybe but it requires hardware sensor -
@seabass you can use the MMM-PageIndicator module to put buttons on the screen to provide manual nav (and you can customize the buttons using css)
its not swipe tho
also, are you talking mouse swipe, finger swipe, hand waving swipe?
they all have different requirements for implementation -
@sdetweil I seem to only see the onIdle notification from the MMM-Touch module. When I use the MMM-SmartTouch module it works as it should so I know the touch screen is working fine. Here’s my config for MMM-Touch.
module: "MMM-Touch", position: "fullscreen_above", config: { debug: false, useDisplay: true, autoMode: false, threshold: { moment_ms: 1000 * 0.5, double_ms: 1000 * 0.75, press_ms: 1000 * 3, move_px: 50, pinch_px: 50, rotate_dg: 20, idle_ms: 30000, }, defaultMode: "default", onTouchStart: "TOUCH_ACTIVITY_STARTED", onTouchEnd: null, onTouchEnd: "TOUCH_ACTIVITY_ENDED" onIdle: "TOUCH_IDLE_TRIGGERED", gestureCommands: { "default": { "SWIPE-LEFT": (commander, gesture) => { commander.sendNotification("NEW_PAGE"), commander.sendNotification("PAGE_INCREMENT") }, "SWIPE-RIGHT": (commander, gesture) => { commander.sendNotification("NEW_PAGE"), commander.sendNotification("PAGE_DECREMENT") } } } }
-
@sdetweil I’ve been trying to use MMM-Touch (https://github.com/gfischershaw/MMM-Touch/tree/master) which says it’s a plugin for touch gesture commander using touchscreen. Regarding what type of swipe, I’m wanting to use finger swipe on the touchscreen. For testing purposes, mouse swipe when using VNC would be nice.
-
@seabass so, using MMM-ViewNotifications module
do you see the notifications going out?
if you look in the developers window console tab (ctrl-shift-i) do you see any errors related to the touch module?what other modules are loaded besides pages?
-
@sdetweil The only notification from MMM-Touch I saw was that onIdle one I mentioned earlier. I saw a css error in the dev console. I’m not in front of the Pi right now so I can’t get the exact message but I don’t think it has anything to do with this issue. I have the MMM-Pages, MMM-page-indicator and standard modules loaded. I initially had the MMM-SmartTouch loaded which worked but I removed it for now until I can get the MMM-Touch working.