Formatted code (#1007)

* Updated style

* Updated files

* fixed new line

* Updated spacing

* File fix WIP

* Updated to clang 13

* updated comment style

* Removed old comment code
This commit is contained in:
jLynx 2023-05-19 08:16:05 +12:00 committed by GitHub
parent 7aca7ce74d
commit 033c4e9a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
599 changed files with 70746 additions and 66896 deletions

View file

@ -28,43 +28,37 @@
#define __RDS_H__
namespace rds {
#define RDS_OFFSET_A 0b0011111100
#define RDS_OFFSET_B 0b0110011000
#define RDS_OFFSET_C 0b0101101000
#define RDS_OFFSET_Cp 0b1101010000
#define RDS_OFFSET_D 0b0110110100
#define RDS_OFFSET_A 0b0011111100
#define RDS_OFFSET_B 0b0110011000
#define RDS_OFFSET_C 0b0101101000
#define RDS_OFFSET_Cp 0b1101010000
#define RDS_OFFSET_D 0b0110110100
struct RDS_flags {
uint16_t PI_code;
uint8_t PTY;
uint8_t DI;
bool TP;
bool TA;
bool MS;
uint16_t PI_code;
uint8_t PTY;
uint8_t DI;
bool TP;
bool TA;
bool MS;
};
struct RDSGroup {
uint32_t block[4];
uint32_t block[4];
};
uint32_t make_block(uint32_t blockdata, uint16_t offset);
uint8_t b2b(const bool in);
RDSGroup make_0B_group(const uint16_t PI_code, const bool TP, const uint8_t PTY, const bool TA,
const bool MS, const bool DI, const uint8_t C, const std::string chars);
RDSGroup make_2A_group(const uint16_t PI_code, const bool TP, const uint8_t PTY, const bool AB,
const uint8_t segment, const std::string chars);
RDSGroup make_4A_group(const uint16_t PI_code, const bool TP, const uint8_t PTY,
const uint16_t year, const uint8_t month, const uint8_t day,
const uint8_t hour, const uint8_t minute, const int8_t local_offset);
RDSGroup make_0B_group(const uint16_t PI_code, const bool TP, const uint8_t PTY, const bool TA, const bool MS, const bool DI, const uint8_t C, const std::string chars);
RDSGroup make_2A_group(const uint16_t PI_code, const bool TP, const uint8_t PTY, const bool AB, const uint8_t segment, const std::string chars);
RDSGroup make_4A_group(const uint16_t PI_code, const bool TP, const uint8_t PTY, const uint16_t year, const uint8_t month, const uint8_t day, const uint8_t hour, const uint8_t minute, const int8_t local_offset);
void gen_PSN(std::vector<RDSGroup>& frame, const std::string& psname, const RDS_flags * rds_flags);
void gen_RadioText(std::vector<RDSGroup>& frame, const std::string& text, const bool AB, const RDS_flags * rds_flags);
void gen_ClockTime(std::vector<RDSGroup>& frame, const RDS_flags * rds_flags,
const uint16_t year, const uint8_t month, const uint8_t day,
const uint8_t hour, const uint8_t minute, const int8_t local_offset);
void gen_PSN(std::vector<RDSGroup>& frame, const std::string& psname, const RDS_flags* rds_flags);
void gen_RadioText(std::vector<RDSGroup>& frame, const std::string& text, const bool AB, const RDS_flags* rds_flags);
void gen_ClockTime(std::vector<RDSGroup>& frame, const RDS_flags* rds_flags, const uint16_t year, const uint8_t month, const uint8_t day, const uint8_t hour, const uint8_t minute, const int8_t local_offset);
} /* namespace rds */
#endif/*__RDS_H__*/
#endif /*__RDS_H__*/