Skip to content
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

Support SESAME bot #45

Merged
merged 4 commits into from Jul 20, 2021
Merged

Support SESAME bot #45

merged 4 commits into from Jul 20, 2021

Conversation

mochipon
Copy link
Owner

Thanks to @Chabiichi-san, I was able to get one SESAME bot. His offer is very much appreciated.

This PR is the initial try to support SESAME bot. I have three concerns at this point.

  1. SESAME bot can only be used to click at the official app. However, as strange as it may sound, the API allows you to lock and unlock. That is, instead of a series of press and release, you can instruct it to just press or release. For now, the implementation will be the same as the official app, where only clicks are possible.
  2. In fact, the two implementations of CHSesame2 and CHSesameBot were exactly the same. It would be better to move their common parts to SesameLocker. The reason I hesitate to do so at this point is that I cannot imagine how the upcoming release of SesameOS2 updated Sesame1 will be implemented.
  3. I don't know what history event type 18 is supposed to mean. This will be recorded when the CLICK command is delivered. However, the same number is returned whether the event is triggered via Bluetooth (bleClick) or via WiFi module (wm2Click). The history handling related to SESAME bot is implemented in the SDK for iOS but not for Android and unfortunately I am implementing pysesame3 based on the SDK for Android.

@codecov
Copy link

codecov bot commented Jul 18, 2021

Codecov Report

Merging #45 (5ff15ff) into main (3734507) will decrease coverage by 1.35%.
The diff coverage is 86.13%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #45      +/-   ##
==========================================
- Coverage   92.73%   91.38%   -1.36%     
==========================================
  Files           9       10       +1     
  Lines         482      569      +87     
==========================================
+ Hits          447      520      +73     
- Misses         35       49      +14     
Impacted Files Coverage Δ
pysesame3/chsesamebot.py 82.05% <82.05%> (ø)
pysesame3/chsesame2.py 86.36% <100.00%> (-1.14%) ⬇️
pysesame3/cloud.py 89.42% <100.00%> (ø)
pysesame3/const.py 100.00% <100.00%> (ø)
pysesame3/helper.py 100.00% <100.00%> (ø)
pysesame3/history.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3734507...5ff15ff. Read the comment docs.

@mochipon mochipon merged commit e9549e1 into main Jul 20, 2021
@mochipon mochipon deleted the feat/bot branch July 20, 2021 12:30
@mochipon mochipon added this to the 0.5 milestone Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant