Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
修复macOS串口显示
Browse files Browse the repository at this point in the history
  • Loading branch information
M3chD09 committed May 25, 2020
1 parent 443dc8e commit d3ea5d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backend/SerialHandle/SerialHandle.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func FindSerialPorts() []string {
log.Println("No serial ports found!")
}
for _, port := range tmp {
if strings.Contains(port, "USB") || strings.Contains(port, "ACM") || strings.Contains(port, "COM") {
if strings.Contains(port, "USB") || strings.Contains(port, "ACM") || strings.Contains(port, "COM") || strings.Contains(port, "tty.usb") {
ports = append(ports, port)
}
}
Expand Down
7 changes: 3 additions & 4 deletions frontend/src/components/SerialPort.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
<v-list-item-title>串口</v-list-item-title>
</v-list-item>
<v-list-item>
<v-list-item-action>
<v-switch v-model="status" v-on:change="optSerial()" inset></v-switch>
</v-list-item-action>
<v-select
prepend-icon="mdi-serial-port"
:items="serialList"
v-model="serial"
v-on:click="getSerialList()"
v-bind:disabled="status"
label="选择串口"
></v-select>
<v-list-item-action>
<v-switch v-model="status" v-on:change="optSerial()" inset></v-switch>
</v-list-item-action>
</v-list-item>
</v-list>
</template>
Expand Down

0 comments on commit d3ea5d5

Please sign in to comment.