diff --git a/README.md b/README.md
index 37cf297673dff17e7c124fa8ad46dc78b25bfe84..45594840cdf8f2c36d1d77459306fbdc250d23f6 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ with bindings for all message sets.
 Add to your Cargo.toml:
 
 ```
-mavlink = "0.10.1"
+mavlink = "0.12.2"
 ```
 
 ## Examples
diff --git a/build/parser.rs b/build/parser.rs
index f14c6956a3b79c45a4ec95373fdc6eb38057fc90..a0618c53192da89d886e7c7fc6abc79015d9c76f 100644
--- a/build/parser.rs
+++ b/build/parser.rs
@@ -180,6 +180,7 @@ impl MavProfile {
         quote! {
             #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
             #[cfg_attr(feature = "serde", serde(tag = "type"))]
+            #[repr(u32)]
             pub enum MavMessage {
                 #(#enums(#structs),)*
             }
@@ -390,6 +391,7 @@ impl MavEnum {
                 #[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
                 #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
                 #[cfg_attr(feature = "serde", serde(tag = "type"))]
+                #[repr(u32)]
                 #description
                 pub enum #enum_name {
                     #(#defs)*