8 Commits

Author SHA1 Message Date
265c3b3b39 initial commit 2024-02-22 16:36:52 +01:00
6a1786ec9a Merge remote-tracking branch 'origin/develop' into develop 2024-02-22 16:34:46 +01:00
e3843db340 initial commit 2024-02-22 16:34:35 +01:00
da2a06b23a speedup servo little bit 2024-02-09 10:56:19 +01:00
1d1874872b Merge branch 'master' into develop 2024-02-09 08:58:02 +01:00
2d32523317 fuck u 2024-02-09 08:57:25 +01:00
c270a764f2 Merge pull request 'patch' (#22) from develop into master
Reviewed-on: #22
2024-02-02 17:10:54 +01:00
01728a2499 Merge pull request 'feat:V1.0' (#8) from develop into master
Reviewed-on: #8
2024-02-02 17:03:23 +01:00
6 changed files with 41 additions and 43 deletions

View File

@ -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

View File

@ -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

View 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

View File

@ -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

View File

@ -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();
}
}

View File

@ -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);
}
}