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

refactor!: core architecture #24

Merged
merged 16 commits into from
Nov 24, 2022
Merged

Conversation

leon0399
Copy link
Member

@leon0399 leon0399 commented Nov 20, 2022

Goal

The purpose of this PR is to change core architecture, allowing painless changes to existing components (such as Connection/BLE stack, #23) and adding new components (such as Battery in #17)

Binary sized

Original size:

image

New size:

image

Comparison:

Original New
Ram 31416 31400
Flash 1005102 1004622

@leon0399 leon0399 force-pushed the feature/refactor-architecture branch from 4247d4b to 1d697e4 Compare November 20, 2022 19:35
@leon0399 leon0399 force-pushed the feature/refactor-architecture branch from 4682b7a to 1efbb63 Compare November 21, 2022 20:13
[skip ci]

BREKING CHANGE: connection no longer can be registered as simple component
@leon0399 leon0399 force-pushed the feature/refactor-architecture branch from 9204129 to c21d1f1 Compare November 22, 2022 22:44
@leon0399 leon0399 force-pushed the feature/refactor-architecture branch from 5a590b7 to 3314662 Compare November 23, 2022 13:44
@leon0399 leon0399 changed the title refactor: core architecture refactor!: core architecture Nov 23, 2022
@leon0399 leon0399 force-pushed the feature/refactor-architecture branch from 00e5e5b to 269729e Compare November 23, 2022 14:59
@leon0399 leon0399 marked this pull request as ready for review November 23, 2022 16:43
@leon0399
Copy link
Member Author

leon0399 commented Nov 23, 2022

I decoupled output writes themselves (e.g. activate closest motors to requested output, or interpolate between surrounding motors) and registering motors input, like auto and auto with margins (btw, auto with margins makes more sense IMO)
These output changes will simplify things for part of #6 issue - in-cloud on-demand firmware builder for WebSerial flash

Difference between `auto` and `auto with margins`

* - motor
= - empty space

Auto:

*=========*
*=========*
*=========*

Auto with margins:

===*===*===
===*===*===
===*===*===

But I'm not entirely sold on my solution now, cause:

  1. We need to have 4 different options (Coordinates based on this: [WIP] [RFC]: OpenHaptics protocol #9):
    • both X and Y axes use auto
    • both X and Y axes use auto with margins
    • X uses auto and Y uses auto with margins
    • X uses auto with margins and Y uses auto
    • Something more custom:
      image
  2. For a more DRY approach, the same functions should be used for the make_point functions in all current bHaptics configs

As for now, 2nd requirement is partly achieved, but due to 1st is not met, it is not customizable at all

That is all because my vision for the future is entirely different from the current bHaptics BLE protocol allows:

  • it is limited to 40 output points max
  • because of DIY nature of project, other configurations must be achievable also (e.g. 32 vest, with only PCAs used, without ledc, x8 vest for very lightweight setups, etc)

@leon0399 leon0399 added this to the 0.4.0 - Cleanup milestone Nov 24, 2022
@leon0399 leon0399 merged commit 75869a1 into master Nov 24, 2022
@leon0399 leon0399 deleted the feature/refactor-architecture branch November 25, 2022 10:27
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.

1 participant