mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-27 06:35:20 +00:00
mesh: move state def to mesh_generic_model.h
This commit is contained in:
parent
24678bce17
commit
c2a5dc789b
@ -57,6 +57,17 @@ extern "C"
|
||||
#define MESH_GENERIC_MOVE_SET 0x820Bu
|
||||
#define MESH_GENERIC_MOVE_SET_UNACKNOWLEDGED 0x820Cu
|
||||
|
||||
typedef struct {
|
||||
mesh_transition_t base_transition;
|
||||
|
||||
uint8_t current_value;
|
||||
uint8_t target_value;
|
||||
} mesh_transition_bool_t;
|
||||
|
||||
typedef struct {
|
||||
mesh_transition_bool_t transition_data;
|
||||
} mesh_generic_on_off_state_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
#endif
|
||||
|
@ -198,8 +198,6 @@ static void mesh_generic_on_off_status_message(mesh_model_t *generic_on_off_serv
|
||||
}
|
||||
// setup message
|
||||
mesh_transport_pdu_t * transport_pdu = NULL;
|
||||
|
||||
|
||||
if (state->transition_data.base_transition.remaining_transition_time_ms != 0) {
|
||||
transport_pdu = mesh_access_setup_segmented_message(&mesh_generic_on_off_status_transition, state->transition_data.current_value,
|
||||
state->transition_data.target_value, state->transition_data.base_transition.remaining_transition_time_ms);
|
||||
@ -238,7 +236,6 @@ static void generic_on_off_handle_set_message(mesh_model_t *mesh_model, mesh_pdu
|
||||
uint8_t delay_time_gdtt = 0;
|
||||
|
||||
mesh_transition_t * base_transition = generic_on_off_server_get_base_transition(mesh_model);
|
||||
|
||||
switch (mesh_access_transitions_transaction_status(base_transition, tid, mesh_pdu_src(pdu), mesh_pdu_dst(pdu))){
|
||||
case MESH_TRANSACTION_STATUS_RETRANSMISSION:
|
||||
// ignore on retransmission
|
||||
|
@ -46,17 +46,6 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
mesh_transition_t base_transition;
|
||||
|
||||
uint8_t current_value;
|
||||
uint8_t target_value;
|
||||
} mesh_transition_bool_t;
|
||||
|
||||
typedef struct {
|
||||
mesh_transition_bool_t transition_data;
|
||||
} mesh_generic_on_off_state_t;
|
||||
|
||||
const mesh_operation_t * mesh_generic_on_off_server_get_operations(void);
|
||||
/**
|
||||
* @brief Register packet handler
|
||||
|
Loading…
x
Reference in New Issue
Block a user