-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from tinymovr/2_0_x
Tinymovr version 2.0.x
- Loading branch information
Showing
39 changed files
with
923 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
* This file was automatically generated using Avlos. | ||
* https://github.com/tinymovr/avlos | ||
* | ||
* Any changes to this file will be overwritten when | ||
* content is regenerated. | ||
*/ | ||
|
||
#include <commutation_sensor.hpp> | ||
|
||
uint8_t Commutation_sensor_::get_connection(void) | ||
{ | ||
uint8_t value = 0; | ||
this->send(72, this->_data, 0, true); | ||
if (this->recv(72, this->_data, &(this->_dlc), this->delay_us_value)) | ||
{ | ||
read_le(&value, this->_data); | ||
} | ||
return value; | ||
} | ||
|
||
void Commutation_sensor_::set_connection(uint8_t value) | ||
{ | ||
write_le(value, this->_data); | ||
this->send(72, this->_data, sizeof(uint8_t), false); | ||
} | ||
|
||
float Commutation_sensor_::get_bandwidth(void) | ||
{ | ||
float value = 0; | ||
this->send(73, this->_data, 0, true); | ||
if (this->recv(73, this->_data, &(this->_dlc), this->delay_us_value)) | ||
{ | ||
read_le(&value, this->_data); | ||
} | ||
return value; | ||
} | ||
|
||
void Commutation_sensor_::set_bandwidth(float value) | ||
{ | ||
write_le(value, this->_data); | ||
this->send(73, this->_data, sizeof(float), false); | ||
} | ||
|
||
int32_t Commutation_sensor_::get_raw_angle(void) | ||
{ | ||
int32_t value = 0; | ||
this->send(74, this->_data, 0, true); | ||
if (this->recv(74, this->_data, &(this->_dlc), this->delay_us_value)) | ||
{ | ||
read_le(&value, this->_data); | ||
} | ||
return value; | ||
} | ||
|
||
float Commutation_sensor_::get_position_estimate(void) | ||
{ | ||
float value = 0; | ||
this->send(75, this->_data, 0, true); | ||
if (this->recv(75, this->_data, &(this->_dlc), this->delay_us_value)) | ||
{ | ||
read_le(&value, this->_data); | ||
} | ||
return value; | ||
} | ||
|
||
float Commutation_sensor_::get_velocity_estimate(void) | ||
{ | ||
float value = 0; | ||
this->send(76, this->_data, 0, true); | ||
if (this->recv(76, this->_data, &(this->_dlc), this->delay_us_value)) | ||
{ | ||
read_le(&value, this->_data); | ||
} | ||
return value; | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* This file was automatically generated using Avlos. | ||
* https://github.com/tinymovr/avlos | ||
* | ||
* Any changes to this file will be overwritten when | ||
* content is regenerated. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <helpers.hpp> | ||
|
||
class Commutation_sensor_ : Node | ||
{ | ||
public: | ||
|
||
Commutation_sensor_(uint8_t _can_node_id, send_callback _send_cb, recv_callback _recv_cb, delay_us_callback _delay_us_cb, uint32_t _delay_us_value): | ||
Node(_can_node_id, _send_cb, _recv_cb, _delay_us_cb, _delay_us_value) {}; | ||
uint8_t get_connection(void); | ||
void set_connection(uint8_t value); | ||
float get_bandwidth(void); | ||
void set_bandwidth(float value); | ||
int32_t get_raw_angle(void); | ||
float get_position_estimate(void); | ||
float get_velocity_estimate(void); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.