Skip to content

Commit

Permalink
fix module name
Browse files Browse the repository at this point in the history
  • Loading branch information
martha-johnston committed Nov 4, 2024
1 parent 3c58a2a commit cf191a7
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .canon.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file provides project-level configuration for the canon dev environment utility. https://github.com/viamrobotics/canon
orange-i:
orange-pi:
default: true
image_amd64: ghcr.io/viamrobotics/rdk-devenv:amd64-cache
image_arm64: ghcr.io/viamrobotics/rdk-devenv:arm64-cache
Expand All @@ -9,7 +9,7 @@ orange-i:
group: testbot
persistent: true

orange-i-antique:
orange-pi-antique:
image_amd64: ghcr.io/viamrobotics/antique2:amd64-cache
image_arm64: ghcr.io/viamrobotics/antique2:arm64-cache
minimum_date: 2023-10-26T20:00:00.0Z
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
script: |
let prNumber = context.payload.pull_request && context.payload.pull_request.number;
try {
await github.rest.issues.removeLabel({owner: "viam-modules", repo: "orange-i", issue_number: prNumber, name: "safe to test"});
await github.rest.issues.removeLabel({owner: "viam-modules", repo: "orange-pi", issue_number: prNumber, name: "safe to test"});
} catch (err) {
core.info(`Non-fatal error ${err}, while trying to remove 'safe to test' label.`);
}
let orgResp = await github.rest.orgs.checkMembershipForUser({org: "viam-modules", username: context.payload.sender.login});
if (orgResp.status === 204) {
// order of labeling events must be preserved, so two seperate calls
await github.rest.issues.addLabels({owner: "viam-modules", repo: "orange-i", issue_number: prNumber, labels: ["safe to test"]});
await github.rest.issues.addLabels({owner: "viam-modules", repo: "orange-pi", issue_number: prNumber, labels: ["safe to test"]});
return true;
}
return false;
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pullrequest-trusted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ on:
jobs:
test:
if: (github.event.label.name == 'safe to test' || github.event.label.name == 'appimage')
uses: viam-modules/orange-i/.github/workflows/test.yml@main
uses: viam-modules/orange-pi/.github/workflows/test.yml@main
secrets:
MONGODB_TEST_OUTPUT_URI: ${{ secrets.MONGODB_TEST_OUTPUT_URI }}
DOCKER_PUBLIC_READONLY_PAT: ${{ secrets.DOCKER_PUBLIC_READONLY_PAT }}

license_finder:
uses: viam-modules/orange-i/.github/workflows/license_finder.yml@main
uses: viam-modules/orange-pi/.github/workflows/license_finder.yml@main
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
- name: Build and package
run: |
canon --profile orange-i
canon --profile orange-pi
TARGET_OS=${{ matrix.platform }} TARGET_ARCH=${{ matrix.arch }} make module
- name: Upload orange-i module to registry
- name: Upload orange-pi module to registry
uses: viamrobotics/upload-module@main
with:
meta-path: meta.json
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ endif

module: build
rm -f $(BIN_OUTPUT_PATH)/module.tar.gz
tar czf $(BIN_OUTPUT_PATH)/module.tar.gz $(BIN_OUTPUT_PATH)/orange-i meta.json
tar czf $(BIN_OUTPUT_PATH)/module.tar.gz $(BIN_OUTPUT_PATH)/orange-pi meta.json

build: build-go

build-go:
rm -f $(BIN_OUTPUT_PATH)/orange-i
go build -tags no_cgo,osusergo,netgo -ldflags="-extldflags=-static $(COMMON_LDFLAGS)" -o $(BIN_OUTPUT_PATH)/orange-i main.go
rm -f $(BIN_OUTPUT_PATH)/orange-pi
go build -tags no_cgo,osusergo,netgo -ldflags="-extldflags=-static $(COMMON_LDFLAGS)" -o $(BIN_OUTPUT_PATH)/orange-pi main.go

tool-install:
GOBIN=`pwd`/$(TOOL_BIN) go install \
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [`orange-i` module](https://github.com/viam-modules/orange-i)
# [`orange-pi` module](https://github.com/viam-modules/orange-pi)

This [orange-i module](https://app.viam.com/module/viam/orange-i) implements an [Orange Pi Zero2](http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-2.html), [Orange Pi Zero 2W](http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-2W.html) or [OrangePi 3 LTS](http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/orange-pi-3-LTS.html) using the [`rdk:component:board` API](https://docs.viam.com/appendix/apis/components/board/).
This [orange-pi module](https://app.viam.com/module/viam/orange-pi) implements an [Orange Pi Zero2](http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-2.html), [Orange Pi Zero 2W](http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-2W.html) or [OrangePi 3 LTS](http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/orange-pi-3-LTS.html) using the [`rdk:component:board` API](https://docs.viam.com/appendix/apis/components/board/).

## Setup

Expand All @@ -18,11 +18,11 @@ First, follow the installation guide for your specific Orange Pi board:
## Configure your orangepi board

Navigate to the [**CONFIGURE** tab](https://docs.viam.com/configure/) of your [machine](https://docs.viam.com/fleet/machines/) in the [Viam app](https://app.viam.com/).
[Add board / orange-i:orangepi to your machine](https://docs.viam.com/configure/#components).
[Add board / orange-pi:orangepi to your machine](https://docs.viam.com/configure/#components).

### Attributes

The following attributes are available for `viam:orange-i:orangepi` boards:
The following attributes are available for `viam:orange-pi:orangepi` boards:

| Attribute | Type | Required? | Description |
| --------- | ---- | --------- | ---------- |
Expand All @@ -33,11 +33,11 @@ For instructions on implementing analogs, see [Analogs configuration](#Analogs-c

## Example configuration

### `viam:orange-i:orangepi`
### `viam:orange-pi:orangepi`
```json
{
"name": "<your-orange-i-orangepi-board-name>",
"model": "viam:orange-i:orangepi",
"name": "<your-orange-pi-orangepi-board-name>",
"model": "viam:orange-pi:orangepi",
"type": "board",
"namespace": "rdk",
"attributes": {},
Expand Down Expand Up @@ -90,8 +90,8 @@ The following attributes are available for `analogs`:
{
"components": [
{
"name": "<your-orange-i-orangepi-board-name>",
"model": "viam:orange-i:orangepi",
"name": "<your-orange-pi-orangepi-board-name>",
"model": "viam:orange-pi:orangepi",
"type": "board",
"namespace": "rdk",
"attributes": {
Expand Down Expand Up @@ -152,8 +152,8 @@ The following attributes are available for `digital_interrupts`:
{
"components": [
{
"name": "<your-orange-i-orangepi-board-name>",
"model": "viam:orange-i:orangepi",
"name": "<your-orange-pi-orangepi-board-name>",
"model": "viam:orange-pi:orangepi",
"type": "board",
"namespace": "rdk",
"attributes": {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module orange-i
module orange-pi

go 1.23.0

Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package main
import (
"context"

"orange-i/orangepi"
"orange-pi/orangepi"

"go.viam.com/rdk/components/board"
"go.viam.com/rdk/logging"
Expand All @@ -13,7 +13,7 @@ import (
)

func main() {
utils.ContextualMain(mainWithArgs, module.NewLoggerFromArgs("orange-i"))
utils.ContextualMain(mainWithArgs, module.NewLoggerFromArgs("orange-pi"))
}

func mainWithArgs(ctx context.Context, args []string, logger logging.Logger) error {
Expand Down
10 changes: 5 additions & 5 deletions meta.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"$schema": "https://dl.viam.dev/module.schema.json",
"module_id": "viam:orange-i",
"module_id": "viam:orange-pi",
"visibility": "public",
"url": "https://github.com/viam-modules/orange-i",
"description": "Go module for orange-i orangepi board, compatible with Viam",
"url": "https://github.com/viam-modules/orange-pi",
"description": "Go module for orange-pi orangepi board, compatible with Viam",
"models": [
{
"api": "rdk:component:board",
"model": "viam:orange-i:orangepi"
"model": "viam:orange-pi:orangepi"
}
],
"build": {
"build": "make module",
"path": "bin/module.tar.gz",
"arch" : ["linux/arm64"]
},
"entrypoint": "bin/orange-i"
"entrypoint": "bin/orange-pi"
}
4 changes: 2 additions & 2 deletions orangepi/board.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (

const modelName = "orangepi"

// Model for viam supported orange-i orangepi board.
var Model = resource.NewModel("viam", "orange-i", "orangepi")
// Model for viam supported orange-pi orangepi board.
var Model = resource.NewModel("viam", "orange-pi", "orangepi")

func init() {
gpioMappings, err := genericlinux.GetGPIOBoardMappings(modelName, boardInfoMappings)
Expand Down

0 comments on commit cf191a7

Please sign in to comment.