Skip to content

Commit

Permalink
Bed Leveling Custom Action
Browse files Browse the repository at this point in the history
  • Loading branch information
makers-cave committed May 21, 2021
1 parent 05a8456 commit 10aa98d
Show file tree
Hide file tree
Showing 18 changed files with 557 additions and 11 deletions.
2 changes: 2 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ import { URLSafePipe } from './url.pipe';
import { ProfilesComponent } from './profiles/profiles.component';
import { ProfileService } from './services/profiles/profiles.service';
import { ProfileOctoprintService } from './services/profiles/profiles.octoprint.service';
import { BedLevelingComponent } from './bed-leveling/bed-leveling.component';
import { ConfirmComponent } from './confirm/confirm.component';

export function playerFactory(): LottiePlayer {
Expand Down Expand Up @@ -108,6 +109,7 @@ export function playerFactory(): LottiePlayer {
CustomActionsComponent,
ToggleSwitchComponent,
ProfilesComponent,
BedLevelingComponent,
ConfirmComponent,
],
imports: [
Expand Down
39 changes: 39 additions & 0 deletions src/app/bed-leveling/bed-leveling.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<div class="leveling">
<div class="leveling-wrapper" [ngClass]="{ 'leveling-wrapper-fadeout': fadeOutAnimation }">
<div class="leveling-container">
<img src="assets/error.svg" class="leveling__close" (click)="hideScreen()" />
<div class="leveling__content" #levelingMain>
<span class="leveling__heading" i18n="@@leveling">Level Corners</span>
<div class="flex-row-multicolum">
<div class="flex-col border-bottom" (click)="buttonClick(0)">
<!-- Home -->
<img src="assets/home.svg" class="level_icon" />
</div>
<div class="flex-col border-left" (click)="buttonClick(4)" >
<!-- Rear Left -->
<img src="assets/rl.svg" class="level_icon" />
</div>
<div class="flex-col" (click)="buttonClick(3)" >
<!-- Rear Right -->
<img src="assets/rr.svg" class="level_icon" />
</div>
</div>
<div class="flex-row-multicolum">
<div class="flex-col" (click)="buttonClick(5)" >
<!-- Center -->
<img src="assets/c.svg" class="level_icon" />
</div>
<div class="flex-col border-left" (click)="buttonClick(1)">
<!-- Front Left -->
<img src="assets/fl.svg" class="level_icon" />
</div>
<div class="flex-col" (click)="buttonClick(2)">
<!-- Front Right -->
<img src="assets/fr.svg" class="level_icon" />
</div>
</div>
<span class="homing-text" *ngIf="isHomingNeeded">Homing is needed before starting leveling.</span>
</div>
</div>
</div>
</div>
Loading

3 comments on commit 10aa98d

@jneilliii
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@makers-cave is the command being used to run the leveling configurable? Reason I ask is because from my experience with Bed Level Visualizer, there are lots of options out there for various firmware.

Also, not sure how smart it is to make bed leveling a default custom action.

@makers-cave
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jneilliii This is more of a corner leveling (Manual Bed Leveling). The action will open a popup with 6 buttons. Home, all 4 corners, and center. The home button calls G28, 5 point button calls G0 with corresponding corner and center coordinates. The width and depth of the printer profile are used to calculate coordinates.

@jneilliii
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh cool, sorry didn't really look at the code to see what it was doing.

Please sign in to comment.