[Active] Vibrates only 3 times with variable set to 4.

Florian

Member
I have set up a macro to represent church bells and it should "ring" (vibrate) 4 times when at a full hour. You can see that the variable is clearly on 4, but it does only vibrate three times. I tried this multiple times with the same ending. Either I am stupid or this is a bug.
Appreciate any help.
 

Attachments

  • IMG_20240803_080145.jpg
    IMG_20240803_080145.jpg
    227.6 KB · Views: 14

Florian

Member
I put the variables that are set for 15, 30, 45 and 60 one up, so it works now. But it's still confusing.
 

Jacob L

Moderator (Lawsonator)
The part of the macro we see never changes the variable so it will always vibrate. You could increment the variable in the loop if it always vibrates, or use if statements instead of loops
 

Dm114

Well-known member
I have set up a macro to represent church bells and it should "ring" (vibrate) 4 times when at a full hour. You can see that the variable is clearly on 4, but it does only vibrate three times. I tried this multiple times with the same ending. Either I am stupid or this is a bug.
Appreciate any help.
You're right: it looks like a bug!

Just put Wait action first (before vibration) and it works! 😉
 

Florian

Member
The part of the macro we see never changes the variable so it will always vibrate. You could increment the variable in the loop if it always vibrates, or use if statements instead of loops
It's made so it sets the "Minuten Klein" (en: "minutes small") on a specific number based on the current minutes. It should vibrate once when at 15 minutes, twice at 30, three times at 45 minutes and 4 times at a full hour. So I set it to change the variable to exactly that number and it's vibrating 3 times even though the variable says 4.
 

Dm114

Well-known member
I have multiple waits in there already, currently together 1 second waiting between setting the variables and vibrating.
I was speaking about the Wait action inside the loop shown in your first post.

It's up to you duplicate it (this kind of loop) as many times as you need in your macro.
 

md_sgf

Well-known member
I think the last "Else If minute!=0 AND minute!=15..." can be replaced with just "Else".

9.00 pm. Think was 4 vibrations (5-1). Then ONLY 5 hour vibrations (should have been 9).

I have added some debugging code. Will repost here later.
 

md_sgf

Well-known member
@Florian: Try altering the Wait after Vibrate (Long Buzz) to 2 seconds. As MAYBE the first minute vibrate is "camouflaged" by that, as it barely finished the long vibrate after 1 second, so there's sometimes practically ZERO DELAY between that initial vibrate and the first of the minute vibrate's. Which means MAYBE you don't really hear it, which could be why it APPEARS that macro is doing 1 less vibrate than it should.❓
 

Dm114

Well-known member
@Florian: Try altering the Wait after Vibrate (Long Buzz) to 2 seconds. As MAYBE the first minute vibrate is "camouflaged" by that, as it barely finished the long vibrate after 1 second, so there's sometimes practically ZERO DELAY between that initial vibrate and the first of the minute vibrate's. Which means MAYBE you don't really hear it, which could be why it APPEARS that macro is doing 1 less vibrate than it should.❓
Try this: it works!
 
Top