# Settings types and structures

`settings_types.h` file contains all structures and enums used in settings module, that are used in subsequent files and do not need to be auto-generated at build time.&#x20;

## Enum

#### conversion\_t

enum `conversion_t` defines all possible data types used in settings:

* UINT8\_T = 1,&#x20;
* UINT16\_T = 2,&#x20;
* UINT32\_T = 3,&#x20;
* INT8\_T = 4,&#x20;
* INT16\_T = 5,&#x20;
* INT32\_T = 6,&#x20;
* FLOAT = 7,&#x20;
* BYTE\_ARRAY = 8,&#x20;
* BOOL = 9

#### hw\_type

`hw_type` defines all possible HW versions that are supported.&#x20;

* wisentedge\_nrf52840 = 1

#### fw\_type

`fw_type` defines all possible FW versions that are supported in FW.

* lion\_tracker = 1

## Settings

Structures containing settings governing settings, values, messages and commands communication and fields. Mainly containing port number for specific type.

* **`fw_version`**
  * major
  * minor
* **`hw_version`**
  * `hw_type` (enum)
  * major
  * minor
* **`settings_defines`** - settings for basic settings values
  * port
  * `fw_type`
* **`advanced_settings`** - settings for advanced settings values
  * port
* **`commands_settings`**
  * port
* **`values_settings`**
  * port

## Values

Definitions of structs holding values and settings of certain types:

* `value_uint8`
* `value_uint16`
* `value_uint32`
* `value_int8`
* `value_int16`
* `value_int32`
* `value_float`
* `value_byte_array`
* `value_bool`

Each structure is of the same format containing:

* `uint8_t id` - id of setting or value
* `bool enabled` - is setting or value enabled
* `def_val` - default value of certain type
* `min` - min value of certain type
* `max` - max value of certain type
* `uint8_t len` - length of type in bytes&#x20;
* `conversion_t conversion` - data type

Note that float values are stored as `int16_t array[2]` with encoding:&#x20;

`array[0] = (int16_t) float_val`&#x20;

and&#x20;

`array[1] = (int16_t) (float_val - array[0]) * 10000` &#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://irnas.gitbook.io/opencollar/-MDJCI9OmpOqWrQzjNIR/firmware/settings-module/settings-types-and-structures.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
