Compare commits
8 Commits
adc6134d8b
...
develop
Author | SHA1 | Date | |
---|---|---|---|
265c3b3b39 | |||
6a1786ec9a | |||
e3843db340 | |||
da2a06b23a | |||
1d1874872b | |||
2d32523317 | |||
c270a764f2 | |||
01728a2499 |
27
.github/workflows/test_build.yml
vendored
27
.github/workflows/test_build.yml
vendored
@ -1,35 +1,22 @@
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout project
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# - name: Cache pip
|
||||
# uses: actions/cache@v3
|
||||
# with:
|
||||
# path: ~/.cache/pip
|
||||
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
# restore-keys: |
|
||||
# ${{ runner.os }}-pip-
|
||||
|
||||
# # this cache the platformio binaries and not the .pio folder
|
||||
# - name: Cache PlatformIO
|
||||
# uses: actions/cache@v3
|
||||
# with:
|
||||
# path: ~/.platformio
|
||||
# key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
|
||||
- name: Set up Python
|
||||
uses: https://github.com/actions/setup-python@v3
|
||||
uses: actions/setup-python@v3
|
||||
|
||||
- name: Install PlatformIO
|
||||
run: pip install platformio
|
||||
|
@ -22,7 +22,7 @@ build_flags =
|
||||
-D STEPER_ACC=200
|
||||
;-D STEPER_PAS=755.906 ; = 65mm
|
||||
-D STEPER_PAS=58 ; = 5mm
|
||||
-D STEPER_SPEED=2700 ;1000 ; 2500
|
||||
-D STEPER_SPEED=2000 ;1000 ; 2500
|
||||
-D GRBL_UPDATE=165 ;update time in ms
|
||||
;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; App config ;;;
|
||||
@ -40,4 +40,4 @@ build_flags =
|
||||
|
||||
|
||||
|
||||
-D CONVOYER_LEN=80 ;mm
|
||||
-D CONVOYER_LEN=70 ; 80 ;mm
|
||||
|
23
docs/Schématics/Algo.puml
Normal file
23
docs/Schématics/Algo.puml
Normal file
@ -0,0 +1,23 @@
|
||||
@startuml algo
|
||||
|
||||
!pragma useVerticalIf on
|
||||
|
||||
start
|
||||
|
||||
:teste périphérique;
|
||||
|
||||
:gestion bourrage colis;
|
||||
|
||||
if (NFC détecter) then (oui)
|
||||
:j'affiche le tag lu;
|
||||
:je récupère le produit sur Dolibarr;
|
||||
:gestion erreur;
|
||||
:je crée un mouvement de stock Dolibarr;
|
||||
:gestion erreur;
|
||||
:je bouge l'aiguillage de destination;
|
||||
:j'avance de la longueur du tapis;
|
||||
else (non)
|
||||
:avance tapis;
|
||||
endif
|
||||
stop
|
||||
@enduml
|
@ -8,18 +8,6 @@ class Dolibarr {
|
||||
+ String createStockMovement(String tagID, String warehouseId)
|
||||
}
|
||||
|
||||
package "Managers" {
|
||||
abstract AManager {
|
||||
# ILCDScreen lcd
|
||||
# IServoMotor servo
|
||||
# IGRBL grbl
|
||||
# INFCReader nfc
|
||||
}
|
||||
|
||||
class WarehouseManager
|
||||
|
||||
WarehouseManager .|> AManager
|
||||
}
|
||||
|
||||
package "Components" {
|
||||
package "NFCReader" {
|
||||
@ -66,12 +54,11 @@ class Program {
|
||||
+ void loop
|
||||
}
|
||||
|
||||
AManager <-- IServoMotor
|
||||
AManager <-- IGRBL
|
||||
AManager <-- ILCDScreen
|
||||
AManager <-- INFCReader
|
||||
Program <-- IServoMotor
|
||||
Program <-- IGRBL
|
||||
Program <-- ILCDScreen
|
||||
Program <-- INFCReader
|
||||
|
||||
Program <-- WarehouseManager
|
||||
Program <-- Dolibarr
|
||||
Dolibarr --> Program
|
||||
|
||||
@enduml
|
||||
|
@ -173,6 +173,7 @@ void M5LCD::set_dolibarr_status(AvailableComponentsStatus status) {
|
||||
|
||||
void M5LCD::update_dashboard() const {
|
||||
if (this->_current_page == DASHBOARD_SCREEN) {
|
||||
M5.Lcd.clear();
|
||||
this->show_dashboard();
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ Program::Program() {
|
||||
lcdScreen = new M5LCD();
|
||||
lcdScreen->add_log("Initialize M5LCD component....");
|
||||
this->nfcReader = new NfcReader(NFC_ADDR);
|
||||
this->servo = new ServoMotorComponent(2, 1, 1);
|
||||
this->servo = new ServoMotorComponent(2, 1, 1.5);
|
||||
this->servo->setDesiredPosition(Position::MIDDLE);
|
||||
this->grbl = new GRBL(STEPMOTOR_I2C_ADDR);
|
||||
this->outputReader = new BigNfcReader();
|
||||
@ -164,8 +164,8 @@ void Program::loop() {
|
||||
}
|
||||
this->grbl->mouveForward(CONVOYER_LEN);
|
||||
} else {
|
||||
if((this->grbl->isIddle() || (maintenant - this->grblUpdateTime >= GRBL_UPDATE)) && lcdScreen->get_components().grbl == COMPONENT_OK){
|
||||
this->grblUpdateTime = maintenant;
|
||||
if((this->grbl->isIddle()) && lcdScreen->get_components().grbl == COMPONENT_OK){
|
||||
//this->grblUpdateTime = maintenant;
|
||||
this->grbl->mouveForward(5);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user