Skip to content

Commit

Permalink
chore: renamte manage.py to ribot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
alberto-abarzua committed Dec 8, 2023
1 parent 8a6dde7 commit 6171bf4
Show file tree
Hide file tree
Showing 12 changed files with 753 additions and 750 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/backend-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
run: pip install toml

- name: Build backend container
run: ./manage.py build --container backend --no-editable
run: ./ribot.py build --container backend --no-editable

- name: Lint Backend
run: ./manage.py lint --container backend
run: ./ribot.py lint --container backend

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -43,10 +43,10 @@ jobs:

- name: Push Backend Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container backend --op push
run: ./ribot.py docker-compose --container backend --op push

- name: Stop and remove containers
if: always()
run: ./manage.py down --container backend
run: ./ribot.py down --container backend


16 changes: 8 additions & 8 deletions .github/workflows/controller-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ jobs:
run: pip install toml
- name: Build Controller Container
run: |
./manage.py build --container controller
./ribot.py build --container controller
- name: Build Firmware Container
run: |
./manage.py build --container firmware
./ribot.py build --container firmware
- name: Lint Controller
run: ./manage.py lint --container controller
run: ./ribot.py lint --container controller

- name: Run Firmware and Controller Tests
run: ./manage.py test
run: ./ribot.py test

- name: Publish Controller Package
if: github.ref == 'refs/heads/main'
run: ./manage.py publish-controller
run: ./ribot.py publish-controller

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -56,13 +56,13 @@ jobs:

- name: Push Controller Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container controller --op push
run: ./ribot.py docker-compose --container controller --op push

- name: Stop and remove containers
if: always()
run: |
./manage.py down --container controller
./manage.py down --container firmware
./ribot.py down --container controller
./ribot.py down --container firmware


Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/firmware-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- name: Install toml
run: pip install toml
- name: Build Firmware Container for Linux
run: ./manage.py build --container firmware
run: ./ribot.py build --container firmware

- name: Build Firmware for Linux
run: ./manage.py buildf
run: ./ribot.py buildf

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -39,11 +39,11 @@ jobs:

- name: Push Firmware-linux Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container firmware --op push
run: ./ribot.py docker-compose --container firmware --op push

- name: Stop and remove containers
if: always()
run: ./manage.py down --container firmware
run: ./ribot.py down --container firmware

esp-idf-build:
runs-on: ubuntu-latest
Expand All @@ -64,10 +64,10 @@ jobs:
run: printenv | grep -v "^\(PWD\|SHLVL\|HOME\)" > .env

- name: Build ESP-IDF Container
run: ./manage.py build --container esp_idf
run: ./ribot.py build --container esp_idf

- name: Build firmware for ESP32 using ESP-IDF
run: ./manage.py build-esp
run: ./ribot.py build-esp

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -77,10 +77,10 @@ jobs:

- name: Push esp-idf Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container esp_idf --op push
run: ./ribot.py docker-compose --container esp_idf --op push
- name: Stop and remove containers
if: always()
run: ./manage.py down --container esp_idf
run: ./ribot.py down --container esp_idf



Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/frontend-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
- name: Install toml
run: pip install toml
- name: Build frontend container
run: ./manage.py build --container frontend
run: ./ribot.py build --container frontend

- name: Build Unity Webgl
run: ./manage.py build --container unity_webgl_server
run: ./ribot.py build --container unity_webgl_server

- name: Lint Frontend
run: ./manage.py lint --container frontend
run: ./ribot.py lint --container frontend

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -45,13 +45,13 @@ jobs:

- name: Push Frontend Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container frontend --op push
run: ./ribot.py docker-compose --container frontend --op push

- name: Push Unity Webgl Container
if: github.ref == 'refs/heads/main'
run: ./manage.py docker-compose --container unity_webgl_server --op push
run: ./ribot.py docker-compose --container unity_webgl_server --op push

- name: Stop and remove containers
if: always()
run: ./manage.py down --container frontend
run: ./ribot.py down --container frontend

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,31 @@ Welcome to the Ribot project, your comprehensive solution for controlling roboti
git clone https://github.com/alberto-abarzua/ribot.git
```

2. **Manage.py Script**
2. **ribot.py Script**
This utility script facilitates building, running, and managing the project.
- Usage:
```bash
python manage.py --help
python ribot.py --help
```

3. **Building the Firmware for ESP32**
```bash
python manage.py build-esp
python ribot.py build-esp
```

4. **Flashing the Firmware**
```bash
python manage.py build-esp --flash
python ribot.py build-esp --flash
```

5. **Running Backend and Frontend Services**
For real ESP32:
```bash
python manage.py runserver --esp
python ribot.py runserver --esp
```
For a dummy firmware version (Docker):
```bash
python manage.py runserver
python ribot.py runserver
```

## Project Components
Expand Down
6 changes: 5 additions & 1 deletion arm_docs/docs/implementation/hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ The ESP32 is the preferred microcontroller for several reasons:

### Wiring Diagram

(Insert a wiring diagram here showing how to connect the ESP32 to the motors.)
![Wiring Diagram](/img/wiring/wiring_esp.png)
Wiring Diagram for the ESP32 and Stepper Motors

![Wiring Diagram](/img/wiring/tb660.png)
Example using TB6600 Stepper Motor Driver

The wiring diagram is just an example; you can connect the motors in any way you wish, as long as you use the correct type of pins. Make sure to refer to the [ESP32 Pinout Reference](https://randomnerdtutorials.com/esp32-pinout-reference-gpios/) to understand which pins are suitable for output (for motors) and input (for sensors).

Expand Down
Binary file added arm_docs/static/img/wiring/tb660.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added arm_docs/static/img/wiring/wiring_esp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion firmware/components/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void task_end() {}

void run_delay(uint32_t delay_ms) {
std::this_thread::sleep_for(
std::chrono::milliseconds(static_cast<long long>((delay_ms ))));
std::chrono::milliseconds(static_cast<int64_t>((delay_ms))));
}

void run_delay_microseconds(uint32_t delay_us) {
Expand Down
Loading

0 comments on commit 6171bf4

Please sign in to comment.