Commit graph

80 commits

Author SHA1 Message Date
Innovation d4e7411ccb Change module name 2024-03-24 06:34:28 -05:00
Innovation 35e0098706 Implemented workaround by erinarbleiz as described in #54 2024-03-24 06:31:04 -05:00
Elara Musayelyan f5546ca32e Add the ability to set a custom time in weather timeline headers 2023-06-28 22:14:35 -07:00
Elara Musayelyan f2640203e9 Update domain 2023-04-20 19:53:34 -07:00
Elara Musayelyan 4ff1be5b02 Update go.mod domain 2023-04-20 19:49:05 -07:00
Elara Musayelyan 492242bd54 Switch from zerolog to go.arsenm.dev/logger 2023-01-04 15:00:15 -08:00
FloralExMachina 8c5eca51f9 Remove MPRIS controls (#7)
This is the follow up PR for moving Mpris controls to itd

Co-authored-by: razorkitty <razorkitty@null.net>
Reviewed-on: https://gitea.arsenm.dev/Arsen6331/infinitime/pulls/7
Co-authored-by: FloralExMachina <william@null.org.uk>
Co-committed-by: FloralExMachina <william@null.org.uk>
2022-11-22 22:53:35 +00:00
cybuzuma 02444f2b66 Add local time characteristic (#4)
Co-authored-by: cybuzuma <cybuzuma@vnxs.de>
Co-committed-by: cybuzuma <cybuzuma@vnxs.de>
2022-11-21 16:51:49 +00:00
Elara Musayelyan 1f15572063 Merge pull request 'replace pactl based volume control with mpris based volume control' (#6) from FloralExMachina/infinitime:master into master
Reviewed-on: https://gitea.arsenm.dev/Arsen6331/infinitime/pulls/6
2022-11-19 22:46:12 +00:00
razorkitty 19402624bb removed pulseaudio-utils and libpulse dependencies 2022-11-19 22:43:03 +00:00
razorkitty fbc1110d8f replace pactl based volume control with mpris based volume control
methods
2022-11-19 21:30:54 +00:00
Elara Musayelyan 0f12aee5e9 Use NavFlag type in SetFlag() 2022-11-06 20:20:15 -08:00
Elara Musayelyan 4479cad6f9 Improve navigation API 2022-11-06 20:08:13 -08:00
Elara Musayelyan 70ab2e9f03 Fix typo 2022-11-05 20:54:45 -07:00
Elara Musayelyan 9e73961af9 Remove check for unchanged values and refactor code 2022-11-05 20:33:30 -07:00
yannickulrich 0aa25353fd Added Navigation service (#5)
InfiniTime implements a [Navigation Service](https://github.com/InfiniTimeOrg/InfiniTime/blob/develop/doc/NavigationService.md). This pull request will add it to the go library by defining a function
```go
func (i *Device) Navigation(flag string, narrative string, dist string, progress uint8) error {
  ...
}
```
From the InfiniTime manual
 * `flag`: the graphic instruction as provided by [Pure Maps](https://github.com/rinigus/pure-maps/tree/master/qml/icons/navigation). A list of valid instruction icons can be found [here](https://github.com/rinigus/pure-maps/tree/master/qml/icons/navigation)
 * `narrative`: the instruction in words, eg. "At the roundabout take the first exit".
 * `dist`: a short string describing the distance to the upcoming instruction such as "50 m".
 * `progress`: the percent complete in a `uint8`

Adding this to the `itd` daemon is straightforward
```patch
diff --git a/api/types.go b/api/types.go
index 281a85b..14c84de 100644
--- a/api/types.go
+++ b/api/types.go
@@ -22,6 +22,13 @@ type FwUpgradeData struct {
        Files []string
 }

+type NavigationData struct {
+       Flag         string
+       Narrative    string
+       Dist         string
+       Progress     uint8
+}
+
 type NotifyData struct {
        Title string
        Body  string
diff --git a/socket.go b/socket.go
index 6fcba5c..91b37c0 100644
--- a/socket.go
+++ b/socket.go
@@ -204,6 +204,10 @@ func (i *ITD) Address(_ *server.Context) string {
        return i.dev.Address()
 }

+func (i *ITD) Navigation(_ *server.Context, data api.NavigationData) error {
+       return i.dev.Navigation(data.Flag, data.Narrative, data.Dist, data.Progress)
+}
+
 func (i *ITD) Notify(_ *server.Context, data api.NotifyData) error {
        return i.dev.Notify(data.Title, data.Body)
 }
```

Co-authored-by: Yannick Ulrich <yannick.ulrich@durham.ac.uk>
Reviewed-on: https://gitea.arsenm.dev/Arsen6331/infinitime/pulls/5
Co-authored-by: yannickulrich <yannick.ulrich@protonmail.com>
Co-committed-by: yannickulrich <yannick.ulrich@protonmail.com>
2022-11-03 19:09:06 +00:00
Elara Musayelyan 24206c05f3 Assume MTU if not available from BlueZ 2022-10-25 12:36:34 -07:00
Elara Musayelyan 062757b314 Use timestamp with timezone offset to (finally) fix weather issue 2022-10-20 01:41:15 -07:00
Elara Musayelyan 1a95637439 Close files properly when returning an error (Arsen6331/itd#29) 2022-10-17 12:49:49 -07:00
Elara Musayelyan e124e1ccbd Stop DBus errors from causing panics by checking error type (Arsen6331/itd#29) 2022-10-17 12:19:23 -07:00
Elara Musayelyan 5f6b0205da Add debug logging to resource loading 2022-10-16 12:39:42 -07:00
Elara Musayelyan 0c2c2592c7 Fix RemoveAll() and MkdirAll() functions 2022-10-16 12:39:11 -07:00
Elara Musayelyan 986513750f Implement resource loading feature 2022-08-29 14:43:16 -07:00
Elara Musayelyan 4845a33a25 Remove debug code 2022-08-29 14:23:10 -07:00
Elara Musayelyan 12d92afa0a Add RemoveAll() and MkdirAll() to the filesystem implementation 2022-08-29 14:22:02 -07:00
Elara Musayelyan 03aadaa01b Add Stat() to filesystem implementation 2022-08-29 14:06:56 -07:00
Elara Musayelyan 1bf8ee4e7a Fix bug where the filesystem implementation misreports the amount of bytes written, causing functions such as io.Copy() to return an error 2022-08-29 14:05:33 -07:00
Elara Musayelyan a1a289efc9 Update go-bluetooth library for 5.65 support 2022-08-19 14:02:52 -07:00
Elara Musayelyan 91a47acb50 Add contexts and improve error handling 2022-05-11 13:22:57 -07:00
Elara Musayelyan e3a6bd308d Fix error handling in (*FS).Remove() 2022-05-05 12:39:16 -07:00
Elara Musayelyan 2c2d854929 Use adapter ID in btmgmt as well 2022-05-02 20:20:16 -07:00
Elara Musayelyan 5e7a110cdc Ask for adapter ID in Init() 2022-05-02 20:14:46 -07:00
Elara Musayelyan 9f0ee67c0f Clarify DFU debug logs 2022-04-23 20:08:49 -07:00
Elara Musayelyan a832c16d69 Add debug logging 2022-04-23 19:58:00 -07:00
Elara Musayelyan c5d938ce99 Use log level provided in options 2022-04-23 19:07:41 -07:00
Elara Musayelyan 8ff29b0ca9 Ensure that done signals for Watch functions are handled properly and restart notifications if they stop unexpectedly 2022-04-23 18:40:25 -07:00
Elara Musayelyan 165db63deb Log when too many disconnects occur rather than removing the device (Arsen6331/itd#10) 2022-04-16 04:24:21 -07:00
Elara Musayelyan 36aee2e1fe Handle case where artists value is a single string rather than a slice. Fixes Arsen6331/itd#9. 2022-03-04 12:04:37 -08:00
Elara Musayelyan b6ba971d50 Rewrite connect/reconnect code 2022-02-21 02:46:20 -08:00
Elara Musayelyan 2342b0d82a Create custom BlueZ agent 2021-12-16 21:30:29 -08:00
Elara Musayelyan 2f23dd3348 Restrict to one open file of each type at a time 2021-12-13 09:56:34 -08:00
Elara Musayelyan 60a0daa82e Add file transfer progress 2021-12-12 13:25:40 -08:00
Elara Musayelyan db8f03dee7 Add weather service 2021-12-12 12:43:43 -08:00
Elara Musayelyan 90936d8900 Set connected property to true in all connecting functions 2021-11-25 20:33:06 -08:00
Elara Musayelyan a5c90c3b7d Fix checkStatus call in (*Device).FS() 2021-11-25 13:35:58 -08:00
Elara Musayelyan 0a3ed67ede Allow multiple call notification responses and improve error handling 2021-11-25 12:39:43 -08:00
Elara Musayelyan d96dae1f13 Only allow OnChange() to be called once 2021-11-24 17:21:12 -08:00
Elara Musayelyan 388f48b260 Fix README errors 2021-11-24 16:51:42 -08:00
Elara Musayelyan e5c4279346 Remove playerctl from dependencies and add pactl providers 2021-11-24 16:50:35 -08:00
Elara Musayelyan 2a3df6bcf8 Buffer message channel for music 2021-11-24 16:41:56 -08:00